Class SdkHarnessClient.BundleProcessor.ActiveBundle
- All Implemented Interfaces:
AutoCloseable
,RemoteBundle
- Enclosing class:
SdkHarnessClient.BundleProcessor
BeamFnApi.ProcessBundleDescriptor
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Blocks until bundle processing is finished.getId()
Returns an id used to represent this bundle.Get a map of PCollection ids toreceiver
s 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) toreceiver
s which consume timers, forwarding them to the remote environment.void
Ask the remote bundle for progress.void
split
(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:
getId
in interfaceRemoteBundle
-
getInputReceivers
Get a map of PCollection ids toreceiver
s which consume input elements, forwarding them to the remote environment.- Specified by:
getInputReceivers
in interfaceRemoteBundle
-
getTimerReceivers
public Map<KV<String,String>, getTimerReceivers()FnDataReceiver<org.apache.beam.sdk.util.construction.Timer>> Description copied from interface:RemoteBundle
Get a map of (transform id, timer id) toreceiver
s which consume timers, forwarding them to the remote environment.- Specified by:
getTimerReceivers
in interfaceRemoteBundle
-
requestProgress
public void requestProgress()Description copied from interface:RemoteBundle
Ask 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:
requestProgress
in interfaceRemoteBundle
-
split
public void split(double fractionOfRemainder) Description copied from interface:RemoteBundle
Ask 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:
split
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRemoteBundle
- Throws:
Exception
- closing each
-