InputT - the type of the DoFn's (main) input elementsOutputT - the type of the DoFn's (main) output elementspublic class DoFnRunner<InputT,OutputT> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DoFnRunner.ListOutputManager
An implementation of
DoFnRunner.OutputManager using simple lists, for testing and in-memory
contexts such as the DirectPipelineRunner. |
static interface |
DoFnRunner.OutputManager
Information about how to create output receivers and output to them.
|
| Modifier and Type | Field and Description |
|---|---|
com.google.cloud.dataflow.sdk.util.DoFnRunner.DoFnContext<InputT,OutputT> |
context
The context used for running the DoFn.
|
DoFn<InputT,OutputT> |
fn
The DoFn being run.
|
| Modifier and Type | Method and Description |
|---|---|
static <InputT,OutputT> |
create(PipelineOptions options,
DoFn<InputT,OutputT> fn,
SideInputReader sideInputReader,
DoFnRunner.OutputManager outputManager,
TupleTag<OutputT> mainOutputTag,
List<TupleTag<?>> sideOutputTags,
ExecutionContext.StepContext stepContext,
CounterSet.AddCounterMutator addCounterMutator,
WindowingStrategy<?,?> windowingStrategy) |
protected DoFn.ProcessContext |
createProcessContext(WindowedValue<InputT> elem)
Returns a new
DoFn.ProcessContext for the given element. |
void |
finishBundle()
|
protected void |
invokeProcessElement(WindowedValue<InputT> elem) |
void |
processElement(WindowedValue<InputT> elem)
Calls
DoFn.processElement(com.google.cloud.dataflow.sdk.transforms.DoFn<InputT, OutputT>.ProcessContext) with a ProcessContext containing
the current element. |
void |
startBundle()
|
public static <InputT,OutputT> DoFnRunner<InputT,OutputT> create(PipelineOptions options, DoFn<InputT,OutputT> fn, SideInputReader sideInputReader, DoFnRunner.OutputManager outputManager, TupleTag<OutputT> mainOutputTag, List<TupleTag<?>> sideOutputTags, ExecutionContext.StepContext stepContext, CounterSet.AddCounterMutator addCounterMutator, WindowingStrategy<?,?> windowingStrategy)
public void startBundle()
public void processElement(WindowedValue<InputT> elem)
DoFn.processElement(com.google.cloud.dataflow.sdk.transforms.DoFn<InputT, OutputT>.ProcessContext) with a ProcessContext containing
the current element.protected void invokeProcessElement(WindowedValue<InputT> elem)
public void finishBundle()
protected DoFn.ProcessContext createProcessContext(WindowedValue<InputT> elem)
DoFn.ProcessContext for the given element.