@Internal public static class DoFnInvoker.DelegatingArgumentProvider<InputT,OutputT> extends DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
DoFnInvoker.ArgumentProvider
that forwards all calls to the supplied delegate
.Constructor and Description |
---|
DelegatingArgumentProvider(DoFnInvoker.ArgumentProvider<InputT,OutputT> delegate,
java.lang.String errorContext) |
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.String |
getErrorContext()
Return a human readable representation of the current call context to be used during error
reporting.
|
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 alwaysFetch)
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 timerFamilyId)
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. |
public DelegatingArgumentProvider(DoFnInvoker.ArgumentProvider<InputT,OutputT> delegate, java.lang.String errorContext)
public BoundedWindow window()
DoFnInvoker.ArgumentProvider
BoundedWindow
to use within a DoFn
that needs it. This is
called if the DoFn.ProcessElement
method has a parameter of type BoundedWindow
.window
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
window
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
BoundedWindow
of the element currently being processed.public PaneInfo paneInfo(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
PaneInfo
.paneInfo
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
paneInfo
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public PipelineOptions pipelineOptions()
DoFnInvoker.ArgumentProvider
PipelineOptions
.pipelineOptions
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
pipelineOptions
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.StartBundleContext startBundleContext(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.StartBundleContext
to use with the given DoFn
.startBundleContext
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
startBundleContext
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.FinishBundleContext finishBundleContext(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.FinishBundleContext
to use with the given DoFn
.finishBundleContext
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
finishBundleContext
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.ProcessContext processContext(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.ProcessContext
to use with the given DoFn
.processContext
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
processContext
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.OnTimerContext onTimerContext(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.OnTimerContext
to use with the given DoFn
.onTimerContext
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
onTimerContext
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public InputT element(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
element
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
element
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.Object key()
DoFnInvoker.ArgumentProvider
KV
pair.key
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
key
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.Object sideInput(java.lang.String tagId)
DoFnInvoker.ArgumentProvider
sideInput
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
sideInput
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.Object schemaElement(int index)
DoFnInvoker.ArgumentProvider
schemaElement
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
schemaElement
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public org.joda.time.Instant timestamp(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
timestamp
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
timestamp
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public TimeDomain timeDomain(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
timeDomain
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
timeDomain
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.OutputReceiver<OutputT> outputReceiver(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.OutputReceiver
for outputting to the default output.outputReceiver
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
outputReceiver
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.OutputReceiver<Row> outputRowReceiver(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.OutputReceiver
for outputting rows to the default output.outputRowReceiver
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
outputRowReceiver
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.MultiOutputReceiver taggedOutputReceiver(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.MultiOutputReceiver
for outputting to the default output.taggedOutputReceiver
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
taggedOutputReceiver
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.Object restriction()
DoFnInvoker.ArgumentProvider
DoFn
, returns the associated restriction with the current
call.restriction
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
restriction
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public RestrictionTracker<?,?> restrictionTracker()
DoFnInvoker.ArgumentProvider
DoFn
, returns the associated RestrictionTracker
with
the current call.restrictionTracker
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
restrictionTracker
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.Object watermarkEstimatorState()
DoFnInvoker.ArgumentProvider
DoFn
, returns the associated watermark estimator state with
the current call.watermarkEstimatorState
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
watermarkEstimatorState
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public WatermarkEstimator<?> watermarkEstimator()
DoFnInvoker.ArgumentProvider
DoFn
, returns the associated WatermarkEstimator
with
the current call.watermarkEstimator
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
watermarkEstimator
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public State state(java.lang.String stateId, boolean alwaysFetch)
DoFnInvoker.ArgumentProvider
DoFn.StateId
.state
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
state
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public Timer timer(java.lang.String timerId)
DoFnInvoker.ArgumentProvider
DoFn.TimerId
.timer
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
timer
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public TimerMap timerFamily(java.lang.String timerFamilyId)
DoFnInvoker.ArgumentProvider
DoFn.TimerFamily
.timerFamily
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
timerFamily
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.String timerId(DoFn<InputT,OutputT> doFn)
DoFnInvoker.ArgumentProvider
DoFn.TimerFamily
.timerId
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
timerId
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public DoFn.BundleFinalizer bundleFinalizer()
DoFnInvoker.ArgumentProvider
DoFn.BundleFinalizer
for being able to register a callback after the bundle has
been successfully persisted by the runner.bundleFinalizer
in interface DoFnInvoker.ArgumentProvider<InputT,OutputT>
bundleFinalizer
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>
public java.lang.String getErrorContext()
DoFnInvoker.BaseArgumentProvider
getErrorContext
in class DoFnInvoker.BaseArgumentProvider<InputT,OutputT>