Class WrappingCollector<T>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.table.runtime.collector.WrappingCollector<T>
-
- All Implemented Interfaces:
Serializable
,Function
,RichFunction
,Collector<T>
public abstract class WrappingCollector<T> extends AbstractRichFunction implements Collector<T>
ACollector
that wraps another collector. An implementation can decide when to emit to the wrapped collector.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WrappingCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Tear-down method for the user code.void
outputResult(T result)
Outputs the final result to the wrapped collector.void
setCollector(Collector<T> collector)
Sets the current collector which is used to emit the final result.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
-
-
-
Method Detail
-
setCollector
public void setCollector(Collector<T> collector)
Sets the current collector which is used to emit the final result.
-
outputResult
public void outputResult(T result)
Outputs the final result to the wrapped collector.
-
close
public void close()
Description copied from interface:RichFunction
Tear-down method for the user code. It is called after the last call to the main working methods (e.g. map or join). For functions that are part of an iteration, this method will be invoked after each iteration superstep.This method can be used for clean up work.
- Specified by:
close
in interfaceCollector<T>
- Specified by:
close
in interfaceRichFunction
- Overrides:
close
in classAbstractRichFunction
-
-