public abstract class DoFn.ProcessContext extends DoFn.Context
DoFn.processElement(org.apache.beam.sdk.transforms.DoFn<InputT, OutputT>.ProcessContext).| 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 for the window corresponding to the
window of the main input element.
|
abstract Instant |
timestamp()
Returns the timestamp of the input element.
|
abstract BoundedWindow |
window()
Returns the window into which the input element has been assigned.
|
abstract org.apache.beam.sdk.util.WindowingInternals<InputT,OutputT> |
windowingInternals()
Returns the process context to use for implementing windowing.
|
createAggregatorInternal, getPipelineOptions, output, outputWithTimestamp, setupDelegateAggregators, sideOutput, sideOutputWithTimestamppublic abstract InputT element()
The element should be considered immutable. The Dataflow runtime will not mutate the
element, so it is safe to cache, etc. The element should not be mutated by any of the
DoFn methods, because it may be cached elsewhere, retained by the Dataflow runtime,
or used in other unspecified ways.
public abstract <T> T sideInput(PCollectionView<T> view)
See
WindowFn.getSideInputWindow(org.apache.beam.sdk.transforms.windowing.BoundedWindow)
for how this corresponding window is determined.
IllegalArgumentException - if this is not a side inputParDo.withSideInputs(org.apache.beam.sdk.values.PCollectionView<?>...)public abstract Instant timestamp()
See Window
for more information.
public abstract BoundedWindow window()
See Window
for more information.
UnsupportedOperationException - if this DoFn does
not implement DoFn.RequiresWindowAccess.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.
@Experimental public abstract org.apache.beam.sdk.util.WindowingInternals<InputT,OutputT> windowingInternals()