Interface TaskInfo

  • All Known Implementing Classes:
    TaskInfoImpl

    @PublicEvolving
    public interface TaskInfo
    The TaskInfo represents the meta information of current task.
    • Method Detail

      • getTaskName

        String getTaskName()
        Gets the task name.
        Returns:
        The task name.
      • getMaxNumberOfParallelSubtasks

        int getMaxNumberOfParallelSubtasks()
        Gets the max parallelism aka the max number of subtasks.
        Returns:
        The max parallelism.
      • getIndexOfThisSubtask

        int getIndexOfThisSubtask()
        Gets the number of this parallel subtask. The numbering starts from 0 and goes up to parallelism-1 (parallelism as returned by getNumberOfParallelSubtasks()).
        Returns:
        The index of the parallel subtask.
      • getNumberOfParallelSubtasks

        int getNumberOfParallelSubtasks()
        Gets the parallelism with which the parallel task runs.
        Returns:
        The parallelism with which the parallel task runs.
      • 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.
      • getAllocationIDAsString

        String getAllocationIDAsString()
        Returns the allocation id for where this task is executed.
        Returns:
        The allocation id for where this task is executed.