Package org.apache.beam.sdk.transforms
Class DoFn.ProcessContext
- java.lang.Object
-
- org.apache.beam.sdk.transforms.DoFn.WindowedContext
-
- org.apache.beam.sdk.transforms.DoFn.ProcessContext
-
- Enclosing class:
- DoFn<InputT extends @Nullable java.lang.Object,OutputT extends @Nullable java.lang.Object>
public abstract class DoFn.ProcessContext extends DoFn.WindowedContext
Information accessible when running aDoFn.ProcessElement
method.
-
-
Constructor Summary
Constructors Constructor Description ProcessContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 org.joda.time.Instant
timestamp()
Returns the timestamp of the input element.-
Methods inherited from class org.apache.beam.sdk.transforms.DoFn.WindowedContext
getPipelineOptions, output, output, outputWithTimestamp, outputWithTimestamp
-
-
-
-
Method Detail
-
element
@Pure public abstract InputT 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.ProcessElement
method should not mutate the element.
-
sideInput
@Pure public abstract <T> T sideInput(PCollectionView<T> view)
Returns the value of the side input.- Throws:
java.lang.IllegalArgumentException
- if this is not a side input- See Also:
ParDo.SingleOutput.withSideInputs(org.apache.beam.sdk.values.PCollectionView<?>...)
-
timestamp
@Pure public abstract org.joda.time.Instant timestamp()
Returns the timestamp of the input element.See
Window
for more information.
-
pane
@Pure public abstract PaneInfo 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
Window
for more information.
-
-