Class ChainedDriver<IT,OT>
- java.lang.Object
-
- org.apache.flink.runtime.operators.chaining.ChainedDriver<IT,OT>
-
- All Implemented Interfaces:
Collector<IT>
- Direct Known Subclasses:
ChainedAllReduceDriver
,ChainedFlatMapDriver
,ChainedMapDriver
,ChainedReduceCombineDriver
,NoOpChainedDriver
,SynchronousChainedCombineDriver
public abstract class ChainedDriver<IT,OT> extends Object implements Collector<IT>
The interface to be implemented by drivers that do not run in an own task context, but are chained to other tasks.
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskConfig
config
protected ExecutionConfig
executionConfig
protected InternalOperatorMetricGroup
metrics
protected Counter
numRecordsIn
protected Counter
numRecordsOut
protected boolean
objectReuseEnabled
protected Collector<OT>
outputCollector
protected String
taskName
protected ClassLoader
userCodeClassLoader
-
Constructor Summary
Constructors Constructor Description ChainedDriver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
cancelTask()
abstract void
closeTask()
abstract void
collect(IT record)
Emits a record.InternalOperatorIOMetricGroup
getIOMetrics()
Collector<OT>
getOutputCollector()
abstract Function
getStub()
TaskConfig
getTaskConfig()
abstract String
getTaskName()
protected RuntimeContext
getUdfRuntimeContext()
abstract void
openTask()
void
setOutputCollector(Collector<?> outputCollector)
abstract void
setup(AbstractInvokable parent)
void
setup(TaskConfig config, String taskName, Collector<OT> outputCollector, AbstractInvokable parent, UserCodeClassLoader userCodeClassLoader, ExecutionConfig executionConfig, Map<String,Accumulator<?,?>> accumulatorMap)
-
-
-
Field Detail
-
config
protected TaskConfig config
-
taskName
protected String taskName
-
userCodeClassLoader
protected ClassLoader userCodeClassLoader
-
executionConfig
protected ExecutionConfig executionConfig
-
objectReuseEnabled
protected boolean objectReuseEnabled
-
metrics
protected InternalOperatorMetricGroup metrics
-
numRecordsIn
protected Counter numRecordsIn
-
numRecordsOut
protected Counter numRecordsOut
-
-
Method Detail
-
setup
public void setup(TaskConfig config, String taskName, Collector<OT> outputCollector, AbstractInvokable parent, UserCodeClassLoader userCodeClassLoader, ExecutionConfig executionConfig, Map<String,Accumulator<?,?>> accumulatorMap)
-
setup
public abstract void setup(AbstractInvokable parent)
-
cancelTask
public abstract void cancelTask()
-
getStub
public abstract Function getStub()
-
getTaskName
public abstract String getTaskName()
-
collect
public abstract void collect(IT record)
Description copied from interface:Collector
Emits a record.
-
getIOMetrics
public InternalOperatorIOMetricGroup getIOMetrics()
-
getUdfRuntimeContext
protected RuntimeContext getUdfRuntimeContext()
-
setOutputCollector
public void setOutputCollector(Collector<?> outputCollector)
-
getTaskConfig
public TaskConfig getTaskConfig()
-
-