Class DataSourceTask<OT>
- java.lang.Object
-
- org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable
-
- org.apache.flink.runtime.operators.DataSourceTask<OT>
-
- All Implemented Interfaces:
CheckpointableTask
,CoordinatedTask
,TaskInvokable
public class DataSourceTask<OT> extends AbstractInvokable
DataSourceTask which is executed by a task manager. The task reads data and uses anInputFormat
to create records from the input.- See Also:
InputFormat
-
-
Constructor Summary
Constructors Constructor Description DataSourceTask(Environment environment)
Create an Invokable task and set its environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
This method is called when a task is canceled either as a result of a user abort or an execution failure.DistributedRuntimeUDFContext
createRuntimeContext()
void
invoke()
Starts the execution.-
Methods inherited from class org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable
abortCheckpointOnBarrier, cleanUp, dispatchOperatorEvent, getCurrentNumberOfSubtasks, getEnvironment, getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getTaskConfiguration, getUserCodeClassLoader, isUsingNonBlockingInput, maybeInterruptOnCancel, notifyCheckpointAbortAsync, notifyCheckpointCompleteAsync, notifyCheckpointSubsumedAsync, restore, triggerCheckpointAsync, triggerCheckpointOnBarrier
-
-
-
-
Constructor Detail
-
DataSourceTask
public DataSourceTask(Environment environment)
Create an Invokable task and set its environment.- Parameters:
environment
- The environment assigned to this invokable.
-
-
Method Detail
-
invoke
public void invoke() throws Exception
Description copied from interface:TaskInvokable
Starts the execution.This method is called by the task manager when the actual execution of the task starts.
All resources should be cleaned up by calling
TaskInvokable.cleanUp(Throwable)
after the method returns.- Specified by:
invoke
in interfaceTaskInvokable
- Specified by:
invoke
in classAbstractInvokable
- Throws:
Exception
-
cancel
public void cancel() throws Exception
Description copied from interface:TaskInvokable
This method is called when a task is canceled either as a result of a user abort or an execution failure. It can be overwritten to respond to shut down the user code properly.- Specified by:
cancel
in interfaceTaskInvokable
- Overrides:
cancel
in classAbstractInvokable
- Throws:
Exception
-
createRuntimeContext
public DistributedRuntimeUDFContext createRuntimeContext()
-
-