public class SdkHarnessClient.BundleProcessor<T>
extends java.lang.Object
BeamFnApi.ProcessBundleDescriptor
.Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletionStage<org.apache.beam.model.fnexecution.v1.BeamFnApi.RegisterResponse> |
getRegistrationFuture() |
SdkHarnessClient.ActiveBundle<T> |
newBundle(java.util.Map<org.apache.beam.model.fnexecution.v1.BeamFnApi.Target,RemoteOutputReceiver<?>> outputReceivers,
BundleProgressHandler progressHandler)
Start a new bundle for the given
BeamFnApi.ProcessBundleDescriptor identifier. |
SdkHarnessClient.ActiveBundle<T> |
newBundle(java.util.Map<org.apache.beam.model.fnexecution.v1.BeamFnApi.Target,RemoteOutputReceiver<?>> outputReceivers,
StateRequestHandler stateRequestHandler,
BundleProgressHandler progressHandler)
Start a new bundle for the given
BeamFnApi.ProcessBundleDescriptor identifier. |
public java.util.concurrent.CompletionStage<org.apache.beam.model.fnexecution.v1.BeamFnApi.RegisterResponse> getRegistrationFuture()
public SdkHarnessClient.ActiveBundle<T> newBundle(java.util.Map<org.apache.beam.model.fnexecution.v1.BeamFnApi.Target,RemoteOutputReceiver<?>> outputReceivers, BundleProgressHandler progressHandler)
BeamFnApi.ProcessBundleDescriptor
identifier.
The input channels for the returned SdkHarnessClient.ActiveBundle
are derived from the instructions
in the BeamFnApi.ProcessBundleDescriptor
.
NOTE: It is important to SdkHarnessClient.close()
each bundle after all elements are emitted.
try (ActiveBundle<InputT> bundle = SdkHarnessClient.newBundle(...)) {
FnDataReceiver<InputT> inputReceiver = bundle.getInputReceiver();
// send all elements ...
}
public SdkHarnessClient.ActiveBundle<T> newBundle(java.util.Map<org.apache.beam.model.fnexecution.v1.BeamFnApi.Target,RemoteOutputReceiver<?>> outputReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler)
BeamFnApi.ProcessBundleDescriptor
identifier.
The input channels for the returned SdkHarnessClient.ActiveBundle
are derived from the instructions
in the BeamFnApi.ProcessBundleDescriptor
.
NOTE: It is important to SdkHarnessClient.close()
each bundle after all elements are emitted.
try (ActiveBundle<InputT> bundle = SdkHarnessClient.newBundle(...)) {
FnDataReceiver<InputT> inputReceiver = bundle.getInputReceiver();
// send all elements ...
}