public class SdkHarnessClient
extends java.lang.Object
implements java.lang.AutoCloseable
This provides a Java-friendly wrapper around InstructionRequestHandler
and CloseableFnDataReceiver
, which handle lower-level gRPC message wrangling.
Modifier and Type | Class and Description |
---|---|
static class |
SdkHarnessClient.ActiveBundle<InputT>
An active bundle for a particular
BeamFnApi.ProcessBundleDescriptor . |
class |
SdkHarnessClient.BundleProcessor<T>
A processor capable of creating bundles for some registered
BeamFnApi.ProcessBundleDescriptor . |
static interface |
SdkHarnessClient.IdGenerator
A supply of unique identifiers, used internally.
|
static class |
SdkHarnessClient.RemoteInputDestination<T>
A pair of
Coder and BeamFnApi.Target which can be handled by the remote SDK
harness to receive elements sent from the runner. |
static class |
SdkHarnessClient.RemoteOutputReceiver<T>
A pair of
Coder and FnDataReceiver which can be registered to receive elements
for a LogicalEndpoint . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T> SdkHarnessClient.BundleProcessor<T> |
getProcessor(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor,
SdkHarnessClient.RemoteInputDestination<org.apache.beam.sdk.util.WindowedValue<T>> remoteInputDesination) |
java.util.Map<java.lang.String,SdkHarnessClient.BundleProcessor> |
register(java.util.Map<org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor,SdkHarnessClient.RemoteInputDestination<org.apache.beam.sdk.util.WindowedValue<?>>> processBundleDescriptors)
Registers a
BeamFnApi.ProcessBundleDescriptor for future processing. |
static SdkHarnessClient |
usingFnApiClient(InstructionRequestHandler fnApiControlClient,
FnDataService fnApiDataService)
Creates a client for a particular SDK harness.
|
SdkHarnessClient |
withIdGenerator(SdkHarnessClient.IdGenerator idGenerator) |
public static SdkHarnessClient usingFnApiClient(InstructionRequestHandler fnApiControlClient, FnDataService fnApiDataService)
public SdkHarnessClient withIdGenerator(SdkHarnessClient.IdGenerator idGenerator)
public <T> SdkHarnessClient.BundleProcessor<T> getProcessor(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor descriptor, SdkHarnessClient.RemoteInputDestination<org.apache.beam.sdk.util.WindowedValue<T>> remoteInputDesination)
public java.util.Map<java.lang.String,SdkHarnessClient.BundleProcessor> register(java.util.Map<org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleDescriptor,SdkHarnessClient.RemoteInputDestination<org.apache.beam.sdk.util.WindowedValue<?>>> processBundleDescriptors)
BeamFnApi.ProcessBundleDescriptor
for future processing.
A client may block on the result future, but may also proceed without blocking.
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception