public abstract class DoFn.ProcessContext extends DoFn.WindowedContext
DoFn.ProcessElement
method.Constructor and Description |
---|
ProcessContext() |
Modifier and Type | Method and Description |
---|---|
abstract InputT |
element()
Returns the input element to be processed.
|
abstract PaneInfo |
pane()
Returns information about the pane within this window into which the
input element has been assigned.
|
abstract <T> T |
sideInput(PCollectionView<T> view)
Returns the value of the side input.
|
abstract Instant |
timestamp()
Returns the timestamp of the input element.
|
abstract void |
updateWatermark(Instant watermark)
Gives the runner a (best-effort) lower bound about the timestamps of future output associated
with the current element.
|
getPipelineOptions, output, output, outputWithTimestamp, outputWithTimestamp
public abstract InputT element()
The element will not be changed -- it is safe to cache, etc. without copying.
public abstract <T> T sideInput(PCollectionView<T> view)
java.lang.IllegalArgumentException
- if this is not a side inputParDo.SingleOutput.withSideInputs(org.apache.beam.sdk.values.PCollectionView<?>...)
public abstract Instant timestamp()
See Window
for more information.
public abstract PaneInfo pane()
Generally all data is in a single, uninteresting pane unless custom
triggering and/or late data has been explicitly requested.
See Window
for more information.
public abstract void updateWatermark(Instant watermark)
If the DoFn
has multiple outputs, the watermark applies to all of them.
Only splittable DoFns
are allowed to call this method. It is safe to call
this method from a different thread than the one running DoFn.ProcessElement
, but
all calls must finish before DoFn.ProcessElement
returns.