Class SdkHarnessClient.BundleProcessor
- Enclosing class:
SdkHarnessClient
BeamFnApi.ProcessBundleDescriptor
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
An active bundle for a particularBeamFnApi.ProcessBundleDescriptor
. -
Method Summary
Modifier and TypeMethodDescriptionnewBundle
(Map<String, RemoteOutputReceiver<?>> outputReceivers, Map<KV<String, String>, RemoteOutputReceiver<org.apache.beam.sdk.util.construction.Timer<?>>> timerReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler, BundleFinalizationHandler finalizationHandler, BundleCheckpointHandler checkpointHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.newBundle
(Map<String, RemoteOutputReceiver<?>> outputReceivers, Map<KV<String, String>, RemoteOutputReceiver<org.apache.beam.sdk.util.construction.Timer<?>>> timerReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler, BundleSplitHandler splitHandler, BundleCheckpointHandler checkpointHandler, BundleFinalizationHandler finalizationHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.newBundle
(Map<String, RemoteOutputReceiver<?>> outputReceivers, BundleProgressHandler progressHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.newBundle
(Map<String, RemoteOutputReceiver<?>> outputReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.
-
Method Details
-
newBundle
public SdkHarnessClient.BundleProcessor.ActiveBundle newBundle(Map<String, RemoteOutputReceiver<?>> outputReceivers, BundleProgressHandler progressHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.The input channels for the returned
SdkHarnessClient.BundleProcessor.ActiveBundle
are derived from the instructions in theBeamFnApi.ProcessBundleDescriptor
.NOTE: It is important to
SdkHarnessClient.close()
each bundle after all elements are emitted.try (ActiveBundle bundle = SdkHarnessClient.newBundle(...)) { FnDataReceiver<InputT> inputReceiver = (FnDataReceiver) bundle.getInputReceivers().get(mainPCollectionId); // send all main input elements ... }
An exception during
SdkHarnessClient.close()
will be thrown if the bundle requests finalization or attempts to checkpoint by returning aBeamFnApi.DelayedBundleApplication
. -
newBundle
public SdkHarnessClient.BundleProcessor.ActiveBundle newBundle(Map<String, RemoteOutputReceiver<?>> outputReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.The input channels for the returned
SdkHarnessClient.BundleProcessor.ActiveBundle
are derived from the instructions in theBeamFnApi.ProcessBundleDescriptor
.NOTE: It is important to
SdkHarnessClient.close()
each bundle after all elements are emitted.try (ActiveBundle bundle = SdkHarnessClient.newBundle(...)) { FnDataReceiver<InputT> inputReceiver = (FnDataReceiver) bundle.getInputReceivers().get(mainPCollectionId); // send all main input elements ... }
An exception during
SdkHarnessClient.close()
will be thrown if the bundle requests finalization or attempts to checkpoint by returning aBeamFnApi.DelayedBundleApplication
. -
newBundle
public SdkHarnessClient.BundleProcessor.ActiveBundle newBundle(Map<String, RemoteOutputReceiver<?>> outputReceivers, Map<KV<String, String>, RemoteOutputReceiver<org.apache.beam.sdk.util.construction.Timer<?>>> timerReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler, BundleFinalizationHandler finalizationHandler, BundleCheckpointHandler checkpointHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.The input channels for the returned
SdkHarnessClient.BundleProcessor.ActiveBundle
are derived from the instructions in theBeamFnApi.ProcessBundleDescriptor
.NOTE: It is important to
SdkHarnessClient.close()
each bundle after all elements are emitted.try (ActiveBundle bundle = SdkHarnessClient.newBundle(...)) { FnDataReceiver<InputT> inputReceiver = (FnDataReceiver) bundle.getInputReceivers().get(mainPCollectionId); // send all main input elements ... }
An exception during
SdkHarnessClient.close()
will be thrown if the bundle requests finalization ifBundleFinalizationHandler
isnull
or attempts to checkpoint by returning aBeamFnApi.DelayedBundleApplication
. -
newBundle
public SdkHarnessClient.BundleProcessor.ActiveBundle newBundle(Map<String, RemoteOutputReceiver<?>> outputReceivers, Map<KV<String, String>, RemoteOutputReceiver<org.apache.beam.sdk.util.construction.Timer<?>>> timerReceivers, StateRequestHandler stateRequestHandler, BundleProgressHandler progressHandler, BundleSplitHandler splitHandler, BundleCheckpointHandler checkpointHandler, BundleFinalizationHandler finalizationHandler) Start a new bundle for the givenBeamFnApi.ProcessBundleDescriptor
identifier.The input channels for the returned
SdkHarnessClient.BundleProcessor.ActiveBundle
are derived from the instructions in theBeamFnApi.ProcessBundleDescriptor
.NOTE: It is important to
SdkHarnessClient.close()
each bundle after all elements are emitted.try (ActiveBundle bundle = SdkHarnessClient.newBundle(...)) { FnDataReceiver<InputT> inputReceiver = (FnDataReceiver) bundle.getInputReceivers().get(mainPCollectionId); // send all elements ... }
-