public interface RemoteBundle
extends java.lang.AutoCloseable
bundle descriptor
by
forwarding them to a remote environment for processing.
When a RemoteBundle is closed, it will block until bundle processing is finished on remote resources, and throw an exception if bundle processing has failed.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this bundle.
|
java.lang.String |
getId()
Get an id used to represent this bundle.
|
java.util.Map<java.lang.String,FnDataReceiver> |
getInputReceivers()
Get a map of PCollection ids to
receiver s which consume input elements,
forwarding them to the remote environment. |
java.util.Map<KV<java.lang.String,java.lang.String>,FnDataReceiver<org.apache.beam.runners.core.construction.Timer>> |
getTimerReceivers()
Get a map of (transform id, timer id) to
receiver s which consume timers,
forwarding them to the remote environment. |
void |
requestProgress()
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.
|
java.lang.String getId()
java.util.Map<java.lang.String,FnDataReceiver> getInputReceivers()
receiver
s which consume input elements,
forwarding them to the remote environment.java.util.Map<KV<java.lang.String,java.lang.String>,FnDataReceiver<org.apache.beam.runners.core.construction.Timer>> getTimerReceivers()
receiver
s which consume timers,
forwarding them to the remote environment.void requestProgress()
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 any
BundleProgressHandler.onCompleted(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse)
.
void split(double fractionOfRemainder)
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 any BundleCheckpointHandler.onCheckpoint(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse)
.
void close() throws java.lang.Exception
FnDataReceiver
to be closed (future calls to
that FnDataReceiver
will throw an exception), and causes the RemoteBundle
to
produce any buffered outputs. The call to close()
will block until all of the outputs
produced by this bundle have been received and all outstanding progress and split requests have
been handled.close
in interface java.lang.AutoCloseable
java.lang.Exception