Class BeamWorkerStatusGrpcService
java.lang.Object
org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBase
org.apache.beam.runners.fnexecution.status.BeamWorkerStatusGrpcService
- All Implemented Interfaces:
AutoCloseable,org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.AsyncService,FnService,org.apache.beam.vendor.grpc.v1p69p0.io.grpc.BindableService
public class BeamWorkerStatusGrpcService
extends org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBase
implements FnService
A Fn Status service which can collect run-time status information from SDK harnesses for
debugging purpose.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose().static BeamWorkerStatusGrpcServicecreate(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor, HeaderAccessor headerAccessor) Create new instance ofBeamWorkerStatusGrpcService.getAllWorkerStatuses(long timeout, TimeUnit timeUnit) Get all the statuses from all connected SDK harnesses within specified timeout.getSingleWorkerStatus(String workerId, long timeout, 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
bindServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.beam.vendor.grpc.v1p69p0.io.grpc.BindableService
bindService
-
Method Details
-
create
public static BeamWorkerStatusGrpcService create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor, 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
Description copied from interface:FnService.There should be no more calls to any service method by the time a call to
FnService.close()begins. Specifically, this means that aServerthat this service is bound to should have completed a call to theServer.shutdown()method, and all future incoming calls will be rejected.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceFnService- Throws:
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
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
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.
-