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,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,org.apache.flink.util.Collector<T>
public abstract class WrappingCollector<T>
extends org.apache.flink.api.common.functions.AbstractRichFunction
implements org.apache.flink.util.Collector<T>
A
Collector that wraps another collector. An implementation can decide when to emit to
the wrapped collector.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidoutputResult(T result) Outputs the final result to the wrapped collector.voidsetCollector(org.apache.flink.util.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, setRuntimeContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.util.Collector
collect
-
Constructor Details
-
WrappingCollector
public WrappingCollector()
-
-
Method Details
-
setCollector
Sets the current collector which is used to emit the final result. -
outputResult
Outputs the final result to the wrapped collector. -
close
public void close()- Specified by:
closein interfaceorg.apache.flink.util.Collector<T>- Specified by:
closein interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
closein classorg.apache.flink.api.common.functions.AbstractRichFunction
-