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 Type
    Method
    Description
    void
    .
    create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor, HeaderAccessor headerAccessor)
    Create new instance of BeamWorkerStatusGrpcService.
    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

    bindService

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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 of BeamWorkerStatusGrpcService.
      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 Exception
      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 a Server that this service is bound to should have completed a call to the Server.shutdown() method, and all future incoming calls will be rejected.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface FnService
      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:
      workerStatus in interface org.apache.beam.model.fnexecution.v1.BeamFnWorkerStatusGrpc.AsyncService
    • getSingleWorkerStatus

      public String getSingleWorkerStatus(String workerId, long timeout, TimeUnit timeUnit)
      Get the latest SDK worker status from the client's corresponding SDK harness.
      Parameters:
      workerId - worker id of the SDK harness.
      Returns:
      CompletableFuture of WorkerStatusResponse from SDK harness.
    • getAllWorkerStatuses

      public Map<String,String> getAllWorkerStatuses(long timeout, 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.