Class FnApiControlClientPoolService
java.lang.Object
org.apache.beam.model.fnexecution.v1.BeamFnControlGrpc.BeamFnControlImplBase
org.apache.beam.runners.fnexecution.control.FnApiControlClientPoolService
- All Implemented Interfaces:
AutoCloseable
,org.apache.beam.model.fnexecution.v1.BeamFnControlGrpc.AsyncService
,FnService
,org.apache.beam.vendor.grpc.v1p69p0.io.grpc.BindableService
public class FnApiControlClientPoolService
extends org.apache.beam.model.fnexecution.v1.BeamFnControlGrpc.BeamFnControlImplBase
implements FnService
A Fn API control service which adds incoming SDK harness connections to a sink.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
.org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver
<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse> control
(org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest> requestObserver) Called by gRPC for each incoming connection from an SDK harness, and enqueue an available SDK harness client.void
getProcessBundleDescriptor
(org.apache.beam.model.fnexecution.v1.BeamFnApi.GetProcessBundleDescriptorRequest request, org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor> responseObserver) offeringClientsToPool
(ControlClientPool.Sink clientPool, HeaderAccessor headerAccessor) Creates a newFnApiControlClientPoolService
which will enqueue and vend new SDK harness connections.Methods inherited from class org.apache.beam.model.fnexecution.v1.BeamFnControlGrpc.BeamFnControlImplBase
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
-
offeringClientsToPool
public static FnApiControlClientPoolService offeringClientsToPool(ControlClientPool.Sink clientPool, HeaderAccessor headerAccessor) Creates a newFnApiControlClientPoolService
which will enqueue and vend new SDK harness connections.Clients placed into the
clientSink
are owned by whoever consumes them from the other end of the pool. That consumer is responsible for closing the clients when they are no longer needed. -
control
public org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse> control(org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest> requestObserver) Called by gRPC for each incoming connection from an SDK harness, and enqueue an available SDK harness client.Note: currently does not distinguish what sort of SDK it is, so a separate instance is required for each.
- Specified by:
control
in interfaceorg.apache.beam.model.fnexecution.v1.BeamFnControlGrpc.AsyncService
-
getProcessBundleDescriptor
public void getProcessBundleDescriptor(org.apache.beam.model.fnexecution.v1.BeamFnApi.GetProcessBundleDescriptorRequest request, org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor> responseObserver) - Specified by:
getProcessBundleDescriptor
in interfaceorg.apache.beam.model.fnexecution.v1.BeamFnControlGrpc.AsyncService
-
close
public void 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 aServer
that this service is bound to should have completed a call to theServer.shutdown()
method, and all future incoming calls will be rejected.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceFnService
-