Class TableFunctionCollector<T>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.table.runtime.collector.TableFunctionCollector<T>
-
- All Implemented Interfaces:
Serializable
,Function
,RichFunction
,Collector<T>
- Direct Known Subclasses:
ListenableCollector
public abstract class TableFunctionCollector<T> extends AbstractRichFunction implements Collector<T>
The basic implementation of collector forTableFunction
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TableFunctionCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Tear-down method for the user code.Object
getInput()
Gets the input value from left table, which will be used to cross join with the result of table function.boolean
isCollected()
WhetherCollector.collect(Object)
has been called.void
outputResult(Object result)
Output final result of this UDTF to downstreams.void
reset()
Resets the flag to indicate whether [[collect(T)]] has been called.void
setCollector(Collector<?> collector)
Sets the current collector, which used to emit the final row.void
setInput(Object input)
Sets the input row from left table, which will be used to cross join with the result of table function.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
-
-
-
Method Detail
-
setInput
public void setInput(Object input)
Sets the input row from left table, which will be used to cross join with the result of table function.
-
getInput
public Object getInput()
Gets the input value from left table, which will be used to cross join with the result of table function.
-
setCollector
public void setCollector(Collector<?> collector)
Sets the current collector, which used to emit the final row.
-
reset
public void reset()
Resets the flag to indicate whether [[collect(T)]] has been called.
-
outputResult
public void outputResult(Object result)
Output final result of this UDTF to downstreams.
-
isCollected
public boolean isCollected()
WhetherCollector.collect(Object)
has been called.- Returns:
- True if
Collector.collect(Object)
has been called.
-
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
-
-