Interface Transform<I,O>
-
- Type Parameters:
I
- input type.O
- output type.
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractDoFnTransform
,CombineFnFinalTransform
,CombineFnPartialTransform
,CreateViewTransform
,DoFnTransform
,EmptyComponents.EmptyTransform
,FlattenTransform
,GBKTransform
,GroupByKeyTransform
,LatencymarkEmitTransform
,MessageAggregatorTransform
,MessageGeneratorTransform
,NoWatermarkEmitTransform
,PushBackDoFnTransform
,SideInputTransform
,SignalTransform
,StreamTransform
,WindowFnTransform
public interface Transform<I,O> extends java.io.Serializable
Interface for specifying 'What' to do with data. It is to be implemented in the compiler frontend, possibly for every operator in a dataflow language. 'How' and 'When' to do with its input/output data are up to the runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Transform.Context
Context of the transform.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the transform.void
onData(I element)
On data received.void
onLatencymark(LatencyMark latencymark)
On latencymark received.void
onWatermark(Watermark watermark)
On watermark received.void
prepare(Transform.Context context, OutputCollector<O> outputCollector)
Prepare the transform.
-
-
-
Method Detail
-
prepare
void prepare(Transform.Context context, OutputCollector<O> outputCollector)
Prepare the transform.- Parameters:
context
- of the transform.outputCollector
- that collects outputs.
-
onData
void onData(I element)
On data received.- Parameters:
element
- data received.
-
onWatermark
void onWatermark(Watermark watermark)
On watermark received. This method should be called for the minimum watermark among input streams (input watermark). Transform may emit collected data after receiving watermarks.- Parameters:
watermark
- watermark
-
onLatencymark
void onLatencymark(LatencyMark latencymark)
On latencymark received.- Parameters:
latencymark
- latencymark.
-
close
void close()
Close the transform.
-
-