public class DataSinkTask<IT> extends AbstractInvokable
OutputFormat| Constructor and Description |
|---|
DataSinkTask(Environment environment)
Create an Invokable task and set its environment.
|
| 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()
Starts the execution.
|
abortCheckpointOnBarrier, getCurrentNumberOfSubtasks, getEnvironment, getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getTaskConfiguration, getUserCodeClassLoader, notifyCheckpointCompleteAsync, setShouldInterruptOnCancel, shouldInterruptOnCancel, triggerCheckpointAsync, triggerCheckpointOnBarrierpublic DataSinkTask(Environment environment)
environment - The environment assigned to this invokable.public void invoke()
throws Exception
AbstractInvokableMust be overwritten by the concrete task implementation. This method is called by the task manager when the actual execution of the task starts.
All resources should be cleaned up when the method returns. Make sure
to guard the code with try-finally blocks where necessary.
invoke in class AbstractInvokableException - Tasks may forward their exceptions for the TaskManager to handle through failure/recovery.public void cancel()
throws Exception
AbstractInvokablecancel in class AbstractInvokableException - thrown if any exception occurs during the execution of the user codepublic DistributedRuntimeUDFContext createRuntimeContext()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.