@Internal public static interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
The methods on this interface are called by DoFnInvoker
before invoking an annotated
DoFn.StartBundle
, DoFn.ProcessElement
or DoFn.FinishBundle
method that has indicated
it needs the given extra context.
In the case of DoFn.ProcessElement
it is called once per invocation of DoFn.ProcessElement
.
Modifier and Type | Method and Description |
---|---|
DoFn.BundleFinalizer |
bundleFinalizer()
Provide a
DoFn.BundleFinalizer for being able to register a callback after the bundle has
been successfully persisted by the runner. |
InputT |
element(DoFn<InputT,OutputT> doFn)
Provide a reference to the input element.
|
DoFn.FinishBundleContext |
finishBundleContext(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.FinishBundleContext to use with the given DoFn . |
java.lang.Object |
key()
Provide a reference to the input element key in
KV pair. |
DoFn.OnTimerContext |
onTimerContext(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.OnTimerContext to use with the given DoFn . |
DoFn.OutputReceiver<OutputT> |
outputReceiver(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.OutputReceiver for outputting to the default output. |
DoFn.OutputReceiver<Row> |
outputRowReceiver(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.OutputReceiver for outputting rows to the default output. |
PaneInfo |
paneInfo(DoFn<InputT,OutputT> doFn)
Provides a
PaneInfo . |
PipelineOptions |
pipelineOptions()
Provide
PipelineOptions . |
DoFn.ProcessContext |
processContext(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.ProcessContext to use with the given DoFn . |
java.lang.Object |
restriction()
If this is a splittable
DoFn , returns the associated restriction with the current
call. |
RestrictionTracker<?,?> |
restrictionTracker()
If this is a splittable
DoFn , returns the associated RestrictionTracker with
the current call. |
java.lang.Object |
schemaElement(int index)
Provide a reference to the selected schema field corresponding to the input argument
specified by index.
|
java.lang.Object |
sideInput(java.lang.String tagId)
Provide a reference to the input sideInput with the specified tag.
|
DoFn.StartBundleContext |
startBundleContext(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.StartBundleContext to use with the given DoFn . |
State |
state(java.lang.String stateId,
boolean alwaysFetched)
Returns the state cell for the given
DoFn.StateId . |
DoFn.MultiOutputReceiver |
taggedOutputReceiver(DoFn<InputT,OutputT> doFn)
Provide a
DoFn.MultiOutputReceiver for outputting to the default output. |
TimeDomain |
timeDomain(DoFn<InputT,OutputT> doFn)
Provide a reference to the time domain for a timer firing.
|
Timer |
timer(java.lang.String timerId)
Returns the timer for the given
DoFn.TimerId . |
TimerMap |
timerFamily(java.lang.String tagId)
Returns the timerMap for the given
DoFn.TimerFamily . |
java.lang.String |
timerId(DoFn<InputT,OutputT> doFn)
Returns the timer id for the current timer of a
DoFn.TimerFamily . |
org.joda.time.Instant |
timestamp(DoFn<InputT,OutputT> doFn)
Provide a reference to the input element timestamp.
|
WatermarkEstimator<?> |
watermarkEstimator()
If this is a splittable
DoFn , returns the associated WatermarkEstimator with
the current call. |
java.lang.Object |
watermarkEstimatorState()
If this is a splittable
DoFn , returns the associated watermark estimator state with
the current call. |
BoundedWindow |
window()
Construct the
BoundedWindow to use within a DoFn that needs it. |
BoundedWindow window()
BoundedWindow
to use within a DoFn
that needs it. This is
called if the DoFn.ProcessElement
method has a parameter of type BoundedWindow
.BoundedWindow
of the element currently being processed.PipelineOptions pipelineOptions()
PipelineOptions
.DoFn.StartBundleContext startBundleContext(DoFn<InputT,OutputT> doFn)
DoFn.StartBundleContext
to use with the given DoFn
.DoFn.FinishBundleContext finishBundleContext(DoFn<InputT,OutputT> doFn)
DoFn.FinishBundleContext
to use with the given DoFn
.DoFn.ProcessContext processContext(DoFn<InputT,OutputT> doFn)
DoFn.ProcessContext
to use with the given DoFn
.DoFn.OnTimerContext onTimerContext(DoFn<InputT,OutputT> doFn)
DoFn.OnTimerContext
to use with the given DoFn
.java.lang.Object key()
KV
pair.java.lang.Object sideInput(java.lang.String tagId)
java.lang.Object schemaElement(int index)
org.joda.time.Instant timestamp(DoFn<InputT,OutputT> doFn)
TimeDomain timeDomain(DoFn<InputT,OutputT> doFn)
DoFn.OutputReceiver<OutputT> outputReceiver(DoFn<InputT,OutputT> doFn)
DoFn.OutputReceiver
for outputting to the default output.DoFn.OutputReceiver<Row> outputRowReceiver(DoFn<InputT,OutputT> doFn)
DoFn.OutputReceiver
for outputting rows to the default output.DoFn.MultiOutputReceiver taggedOutputReceiver(DoFn<InputT,OutputT> doFn)
DoFn.MultiOutputReceiver
for outputting to the default output.DoFn.BundleFinalizer bundleFinalizer()
DoFn.BundleFinalizer
for being able to register a callback after the bundle has
been successfully persisted by the runner.java.lang.Object restriction()
DoFn
, returns the associated restriction with the current
call.RestrictionTracker<?,?> restrictionTracker()
DoFn
, returns the associated RestrictionTracker
with
the current call.java.lang.Object watermarkEstimatorState()
DoFn
, returns the associated watermark estimator state with
the current call.WatermarkEstimator<?> watermarkEstimator()
DoFn
, returns the associated WatermarkEstimator
with
the current call.State state(java.lang.String stateId, boolean alwaysFetched)
DoFn.StateId
.Timer timer(java.lang.String timerId)
DoFn.TimerId
.TimerMap timerFamily(java.lang.String tagId)
DoFn.TimerFamily
.java.lang.String timerId(DoFn<InputT,OutputT> doFn)
DoFn.TimerFamily
.