public abstract static class BaseExecutionContext.StepContext extends Object implements ExecutionContext.StepContext
ExecutionContext.StepContext.
To complete a concrete subclass, implement timerInternals() and
stateInternals().
| Constructor and Description |
|---|
StepContext(ExecutionContext executionContext,
String stepName,
String transformName) |
| Modifier and Type | Method and Description |
|---|---|
ExecutionContext |
getExecutionContext()
The context in which this step is executing.
|
String |
getStepName()
The name of the step.
|
String |
getTransformName()
The name of the transform for the step.
|
void |
noteOutput(WindowedValue<?> output)
Hook for subclasses to implement that will be called whenever
DoFn.Context.output(OutputT)
is called. |
void |
noteSideOutput(TupleTag<?> tag,
WindowedValue<?> output)
Hook for subclasses to implement that will be called whenever
DoFn.Context.sideOutput(com.google.cloud.dataflow.sdk.values.TupleTag<T>, T)
is called. |
abstract StateInternals |
stateInternals() |
abstract TimerInternals |
timerInternals() |
<T,W extends BoundedWindow> |
writePCollectionViewData(TupleTag<?> tag,
Iterable<WindowedValue<T>> data,
Coder<Iterable<WindowedValue<T>>> dataCoder,
W window,
Coder<W> windowCoder)
Writes the given
PCollectionView data to a globally accessible location. |
public StepContext(ExecutionContext executionContext, String stepName, String transformName)
public String getStepName()
ExecutionContext.StepContextgetStepName in interface ExecutionContext.StepContextpublic String getTransformName()
ExecutionContext.StepContextgetTransformName in interface ExecutionContext.StepContextpublic ExecutionContext getExecutionContext()
ExecutionContext.StepContextgetExecutionContext in interface ExecutionContext.StepContextpublic void noteOutput(WindowedValue<?> output)
ExecutionContext.StepContextDoFn.Context.output(OutputT)
is called.noteOutput in interface ExecutionContext.StepContextpublic void noteSideOutput(TupleTag<?> tag, WindowedValue<?> output)
ExecutionContext.StepContextDoFn.Context.sideOutput(com.google.cloud.dataflow.sdk.values.TupleTag<T>, T)
is called.noteSideOutput in interface ExecutionContext.StepContextpublic <T,W extends BoundedWindow> void writePCollectionViewData(TupleTag<?> tag, Iterable<WindowedValue<T>> data, Coder<Iterable<WindowedValue<T>>> dataCoder, W window, Coder<W> windowCoder) throws IOException
ExecutionContext.StepContextPCollectionView data to a globally accessible location.writePCollectionViewData in interface ExecutionContext.StepContextIOExceptionpublic abstract StateInternals stateInternals()
stateInternals in interface ExecutionContext.StepContextpublic abstract TimerInternals timerInternals()
timerInternals in interface ExecutionContext.StepContext