public class DataSourceTask<OT> extends AbstractInvokable
InputFormat
to create records from the input.InputFormat
Constructor and Description |
---|
DataSourceTask() |
Modifier and Type | Method and 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()
Must be overwritten by the concrete task.
|
void |
registerInputOutput()
Must be overwritten by the concrete task to instantiate the required record reader and record writer.
|
getCurrentNumberOfSubtasks, getEnvironment, getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getTaskConfiguration, getUserCodeClassLoader, setEnvironment
public void registerInputOutput()
AbstractInvokable
registerInputOutput
in class AbstractInvokable
public void invoke() throws Exception
AbstractInvokable
invoke
in class AbstractInvokable
Exception
- Tasks may forward their exceptions for the TaskManager to handle through failure/recovery.public void cancel() throws Exception
AbstractInvokable
cancel
in class AbstractInvokable
Exception
- thrown if any exception occurs during the execution of the user codepublic DistributedRuntimeUDFContext createRuntimeContext()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.