public abstract class DoFn.ProcessContext extends DoFn.Context
DoFn.processElement(com.google.cloud.dataflow.sdk.transforms.DoFn<I, O>.ProcessContext).| Constructor and Description |
|---|
DoFn.ProcessContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract I |
element()
Returns the input element to be processed.
|
abstract DoFn.KeyedState |
keyedState()
Returns this
DoFn's state associated with the input
element's key. |
abstract Instant |
timestamp()
Returns the timestamp of the input element.
|
abstract java.util.Collection<? extends BoundedWindow> |
windows()
Returns the set of windows to which the input element has been assigned.
|
createAggregator, createAggregator, getPipelineOptions, output, outputWithTimestamp, sideInput, sideOutput, sideOutputWithTimestamppublic abstract I element()
public abstract DoFn.KeyedState keyedState()
DoFn's state associated with the input
element's key. This state can be used by the DoFn to
store whatever information it likes with that key. Unlike
DoFn instance variables, this state is persistent and
can be arbitrarily large; it is more expensive than instance
variable state, however. It is particularly intended for
streaming computations.
Requires that this DoFn implements
DoFn.RequiresKeyedState.
Each ParDo invocation with this DoFn as an
argument will maintain its own KeyedState maps, one per
key.
java.lang.UnsupportedOperationException - if this DoFn does
not implement DoFn.RequiresKeyedStatepublic abstract Instant timestamp()
See Window
for more information.
public abstract java.util.Collection<? extends BoundedWindow> windows()
See Window
for more information.