Interface TaskInfo
@Experimental
public interface TaskInfo
TaskInfo contains all the meta information of the task.-
Method Summary
Modifier and TypeMethodDescriptionintGets the attempt number of this parallel subtask.intGets the number of this parallel subtask.intGet the max parallelism of current task.intGet the parallelism of current task.Get the name of current task.
-
Method Details
-
getParallelism
int getParallelism()Get the parallelism of current task.- Returns:
- the parallelism of this process function.
-
getMaxParallelism
int getMaxParallelism()Get the max parallelism of current task.- Returns:
- The max parallelism.
-
getTaskName
String getTaskName()Get the name of current task.- Returns:
- The name of current task.
-
getIndexOfThisSubtask
int getIndexOfThisSubtask()Gets the number of this parallel subtask. The numbering starts from 0 and goes up to parallelism-1 (parallelism as returned bygetParallelism()).- Returns:
- The index of the parallel subtask.
-
getAttemptNumber
int getAttemptNumber()Gets the attempt number of this parallel subtask. First attempt is numbered 0. The attempt number corresponds to the number of times this task has been restarted(after failure/cancellation) since the job was initially started.- Returns:
- The attempt number of the subtask.
-