Class SdkHarnessClient.BundleProcessor.ActiveBundle
- All Implemented Interfaces:
AutoCloseable,RemoteBundle
- Enclosing class:
SdkHarnessClient.BundleProcessor
BeamFnApi.ProcessBundleDescriptor.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Blocks until bundle processing is finished.getId()Returns an id used to represent this bundle.Get a map of PCollection ids toreceivers which consume input elements, forwarding them to the remote environment.Map<KV<String, String>, FnDataReceiver<org.apache.beam.sdk.util.construction.Timer>> Get a map of (transform id, timer id) toreceivers which consume timers, forwarding them to the remote environment.voidAsk the remote bundle for progress.voidsplit(double fractionOfRemainder) Ask the remote bundle to split its current processing based upon its knowledge of remaining work.
-
Method Details
-
getId
Returns an id used to represent this bundle.- Specified by:
getIdin interfaceRemoteBundle
-
getInputReceivers
Get a map of PCollection ids toreceivers which consume input elements, forwarding them to the remote environment.- Specified by:
getInputReceiversin interfaceRemoteBundle
-
getTimerReceivers
public Map<KV<String,String>, getTimerReceivers()FnDataReceiver<org.apache.beam.sdk.util.construction.Timer>> Description copied from interface:RemoteBundleGet a map of (transform id, timer id) toreceivers which consume timers, forwarding them to the remote environment.- Specified by:
getTimerReceiversin interfaceRemoteBundle
-
requestProgress
public void requestProgress()Description copied from interface:RemoteBundleAsk the remote bundle for progress.This method is a no-op if the bundle is complete otherwise it will return after the request has been issued. Any progress reports will be forwarded to the
BundleProgressHandler.All
BundleProgressHandler.onProgress(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleProgressResponse)calls are guaranteed to be called before anyBundleProgressHandler.onCompleted(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse).- Specified by:
requestProgressin interfaceRemoteBundle
-
split
public void split(double fractionOfRemainder) Description copied from interface:RemoteBundleAsk the remote bundle to split its current processing based upon its knowledge of remaining work. A fraction of 0, is equivalent to asking the SDK to checkpoint.This method is a no-op if the bundle is complete otherwise it will return after the request has been issued. Any splits will be forwarded to the
BundleSplitHandler.All
BundleSplitHandler.split(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleSplitResponse)calls are guaranteed to be called before anyBundleCheckpointHandler.onCheckpoint(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse).- Specified by:
splitin interfaceRemoteBundle
-
close
Blocks until bundle processing is finished. This is comprised of:- closing each
input receiver. - closing each
timer receiver. - waiting for the SDK to say that processing the bundle is finished.
- waiting for all inbound data clients to complete
This method will throw an exception if bundle processing has failed.
Throwable.getSuppressed()will return all the reasons as to why processing has failed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRemoteBundle- Throws:
Exception
- closing each
-