Class BeamWorkerStatusGrpcService
- java.lang.Object
-
- org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBase
-
- org.apache.beam.runners.fnexecution.status.BeamWorkerStatusGrpcService
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.AsyncService,org.apache.beam.sdk.fn.server.FnService,org.apache.beam.vendor.grpc.v1p69p0.io.grpc.BindableService
public class BeamWorkerStatusGrpcService extends org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBase implements org.apache.beam.sdk.fn.server.FnServiceA Fn Status service which can collect run-time status information from SDK harnesses for debugging purpose.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static BeamWorkerStatusGrpcServicecreate(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor, org.apache.beam.sdk.fn.server.HeaderAccessor headerAccessor)Create new instance ofBeamWorkerStatusGrpcService.java.util.Map<java.lang.String,java.lang.String>getAllWorkerStatuses(long timeout, java.util.concurrent.TimeUnit timeUnit)Get all the statuses from all connected SDK harnesses within specified timeout.java.lang.StringgetSingleWorkerStatus(java.lang.String workerId, long timeout, java.util.concurrent.TimeUnit timeUnit)Get the latest SDK worker status from the client's corresponding SDK harness.org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusResponse>workerStatus(org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusRequest> requestObserver)-
Methods inherited from class org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBase
bindService
-
-
-
-
Method Detail
-
create
public static BeamWorkerStatusGrpcService create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor, org.apache.beam.sdk.fn.server.HeaderAccessor headerAccessor)
Create new instance ofBeamWorkerStatusGrpcService.- Parameters:
apiServiceDescriptor- describes the configuration for the endpoint the server will expose.headerAccessor- headerAccessor gRPC header accessor used to obtain SDK harness worker id.- Returns:
BeamWorkerStatusGrpcService
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceorg.apache.beam.sdk.fn.server.FnService- Throws:
java.lang.Exception
-
workerStatus
public org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusResponse> workerStatus(org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusRequest> requestObserver)
- Specified by:
workerStatusin interfaceorg.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.AsyncService
-
getSingleWorkerStatus
public java.lang.String getSingleWorkerStatus(java.lang.String workerId, long timeout, java.util.concurrent.TimeUnit timeUnit)Get the latest SDK worker status from the client's corresponding SDK harness.- Parameters:
workerId- worker id of the SDK harness.- Returns:
CompletableFutureof WorkerStatusResponse from SDK harness.
-
getAllWorkerStatuses
public java.util.Map<java.lang.String,java.lang.String> getAllWorkerStatuses(long timeout, java.util.concurrent.TimeUnit timeUnit)Get all the statuses from all connected SDK harnesses within specified timeout. Any errors getting status from the SDK harnesses will be returned in the map.- Parameters:
timeout- max time waiting for the response from each SDK harness.timeUnit- timeout time unit.- Returns:
- All the statuses in a map keyed by the SDK harness id.
-
-