Class SdkHarnessClient
java.lang.Object
org.apache.beam.runners.fnexecution.control.SdkHarnessClient
- All Implemented Interfaces:
AutoCloseable
A high-level client for an SDK harness.
This provides a Java-friendly wrapper around InstructionRequestHandler
and CloseableFnDataReceiver
, which handle lower-level gRPC message wrangling.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A processor capable of creating bundles for some registeredBeamFnApi.ProcessBundleDescriptor
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getProcessor
(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDesinations) ProvidesSdkHarnessClient.BundleProcessor
that is capable of processing bundles not containing timers or state accesses such as: Side inputs User state Remote referencesgetProcessor
(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDesinations, StateDelegator stateDelegator) ProvidesSdkHarnessClient.BundleProcessor
that is capable of processing bundles not containing timers.getProcessor
(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDestinations, StateDelegator stateDelegator, Map<String, Map<String, ProcessBundleDescriptors.TimerSpec>> timerSpecs) ProvidesSdkHarnessClient.BundleProcessor
that is capable of processing bundles containing timers and state accesses such as: Side inputs User state Remote referencesstatic SdkHarnessClient
usingFnApiClient
(InstructionRequestHandler fnApiControlClient, FnDataService fnApiDataService) Creates a client for a particular SDK harness.withIdGenerator
(IdGenerator idGenerator)
-
Method Details
-
getInstructionRequestHandler
-
usingFnApiClient
public static SdkHarnessClient usingFnApiClient(InstructionRequestHandler fnApiControlClient, FnDataService fnApiDataService) Creates a client for a particular SDK harness. It is the responsibility of the caller to ensure that these correspond to the same SDK harness, so control plane and data plane messages can be correctly associated. -
withIdGenerator
-
getProcessor
public SdkHarnessClient.BundleProcessor getProcessor(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDesinations) ProvidesSdkHarnessClient.BundleProcessor
that is capable of processing bundles not containing timers or state accesses such as:- Side inputs
- User state
- Remote references
Note that bundle processors are cached based upon the
process bundle descriptor id
. A previously created instance may be returned. -
getProcessor
public SdkHarnessClient.BundleProcessor getProcessor(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDesinations, StateDelegator stateDelegator) ProvidesSdkHarnessClient.BundleProcessor
that is capable of processing bundles not containing timers.Note that bundle processors are cached based upon the
process bundle descriptor id
. A previously created instance may be returned. -
getProcessor
public SdkHarnessClient.BundleProcessor getProcessor(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDestinations, StateDelegator stateDelegator, Map<String, Map<String, ProcessBundleDescriptors.TimerSpec>> timerSpecs) ProvidesSdkHarnessClient.BundleProcessor
that is capable of processing bundles containing timers and state accesses such as:- Side inputs
- User state
- Remote references
Note that bundle processors are cached based upon the
process bundle descriptor id
. A previously created instance may be returned. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-