Class 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.FnService
    A 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
      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.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 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 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 java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.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:
        workerStatus in interface org.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:
        CompletableFuture of 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.