public class BeamWorkerStatusGrpcService
extends org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBase
implements org.apache.beam.sdk.fn.server.FnService
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static BeamWorkerStatusGrpcService |
create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.fn.server.HeaderAccessor headerAccessor)
Create new instance of
BeamWorkerStatusGrpcService. |
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.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.
|
org.apache.beam.vendor.grpc.v1p43p2.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusResponse> |
workerStatus(org.apache.beam.vendor.grpc.v1p43p2.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusRequest> requestObserver) |
bindServicepublic static BeamWorkerStatusGrpcService create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor, org.apache.beam.sdk.fn.server.HeaderAccessor headerAccessor)
BeamWorkerStatusGrpcService.apiServiceDescriptor - describes the configuration for the endpoint the server will
expose.headerAccessor - headerAccessor gRPC header accessor used to obtain SDK harness worker id.BeamWorkerStatusGrpcServicepublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseableclose in interface org.apache.beam.sdk.fn.server.FnServicejava.lang.Exceptionpublic org.apache.beam.vendor.grpc.v1p43p2.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusResponse> workerStatus(org.apache.beam.vendor.grpc.v1p43p2.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.WorkerStatusRequest> requestObserver)
workerStatus in class org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.BeamFnWorkerStatusImplBasepublic java.lang.String getSingleWorkerStatus(java.lang.String workerId,
long timeout,
java.util.concurrent.TimeUnit timeUnit)
workerId - worker id of the SDK harness.CompletableFuture of WorkerStatusResponse from SDK harness.public java.util.Map<java.lang.String,java.lang.String> getAllWorkerStatuses(long timeout,
java.util.concurrent.TimeUnit timeUnit)
timeout - max time waiting for the response from each SDK harness.timeUnit - timeout time unit.