Package org.apache.beam.sdk.transforms
Class DoFn.ProcessContext
java.lang.Object
DoFn<InputT,OutputT>.org.apache.beam.sdk.transforms.DoFn.WindowedContext
org.apache.beam.sdk.transforms.DoFn.ProcessContext
Information accessible when running a
DoFn.ProcessElement method.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringabstract Longabstract InputTelement()Returns the input element to be processed.abstract PaneInfopane()Returns information about the pane within this window into which the input element has been assigned.abstract <T> TsideInput(PCollectionView<T> view) Returns the value of the side input.abstract InstantReturns the timestamp of the input element.Methods inherited from class org.apache.beam.sdk.transforms.DoFn.WindowedContext
getPipelineOptions, output, output, outputWindowedValue, outputWindowedValue, outputWithTimestamp, outputWithTimestamp
-
Constructor Details
-
ProcessContext
public ProcessContext()
-
-
Method Details
-
element
Returns the input element to be processed.The element will not be changed -- it is safe to cache, etc. without copying. Implementation of
DoFn.ProcessElementmethod should not mutate the element. -
sideInput
Returns the value of the side input.- Throws:
IllegalArgumentException- if this is not a side input- See Also:
-
timestamp
Returns the timestamp of the input element.See
Windowfor more information. -
pane
Returns information about the pane within this window into which the input element has been assigned.Generally all data is in a single, uninteresting pane unless custom triggering and/or late data has been explicitly requested. See
Windowfor more information. -
currentRecordId
-
currentRecordOffset
-