public abstract class MapFnRunners
extends java.lang.Object
PTransformRunners which execute simple map functions.
Simple map functions are used in a large number of transforms, especially runner-managed transforms, such as map_windows.
TODO: Add support for DoFns which are actually user supplied map/lambda functions instead of
using the FnApiDoFnRunner instance.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MapFnRunners.ValueMapFnFactory<InputT,OutputT>
A function factory which given a PTransform returns a map function.
|
static interface |
MapFnRunners.WindowedValueMapFnFactory<InputT,OutputT>
A function factory which given a PTransform returns a map function over the entire
WindowedValue of input and output elements. |
| Constructor and Description |
|---|
MapFnRunners() |
| Modifier and Type | Method and Description |
|---|---|
static <InputT,OutputT> |
forValueMapFnFactory(MapFnRunners.ValueMapFnFactory<InputT,OutputT> fnFactory)
Create a
MapFnRunners where the map function consumes elements directly. |
static <InputT,OutputT> |
forWindowedValueMapFnFactory(MapFnRunners.WindowedValueMapFnFactory<InputT,OutputT> fnFactory)
|
public static <InputT,OutputT> PTransformRunnerFactory<?> forValueMapFnFactory(MapFnRunners.ValueMapFnFactory<InputT,OutputT> fnFactory)
MapFnRunners where the map function consumes elements directly.public static <InputT,OutputT> PTransformRunnerFactory<?> forWindowedValueMapFnFactory(MapFnRunners.WindowedValueMapFnFactory<InputT,OutputT> fnFactory)
MapFnRunners where the map function consumes Windowed
Values and produced Windowed Values.
Each WindowedValue provided to the function produced by the MapFnRunners.WindowedValueMapFnFactory will be in exactly one window.