TaskAttemptId (Apache Hadoop MapReduce Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapreduce.v2.api.records, class: TaskAttemptId

Package org.apache.hadoop.mapreduce.v2.api.records

# Class TaskAttemptId

java.lang.Object
org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId

All Implemented Interfaces:
  `Comparable<TaskAttemptId>`

Direct Known Subclasses:
  `TaskAttemptIdPBImpl`

public abstract class TaskAttemptId extends Object implements Comparable<TaskAttemptId>

`TaskAttemptId` represents the unique identifier for a task attempt. Each task attempt is one particular instance of a Map or Reduce Task identified by its TaskId.

TaskAttemptId consists of 2 parts. First part is the `TaskId`, that this `TaskAttemptId` belongs to. Second part is the task attempt number.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String`
  `TASKATTEMPT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TaskAttemptId()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(TaskAttemptId other)`
  `boolean`
  `equals(Object obj)`
  `abstract int`
  `getId()`
  `abstract TaskId`
  `getTaskId()`
  `int`
  `hashCode()`
  `abstract void`
  `setId(int id)`
  `abstract void`
  `setTaskId(TaskId taskId)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### TASKATTEMPT

    protected static final String TASKATTEMPT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### TaskAttemptId

    public TaskAttemptId()

- ## Method Details

  - ### getTaskId

    public abstract TaskId getTaskId()
    Returns:
      the associated TaskId.

  - ### getId

    public abstract int getId()
    Returns:
      the attempt id.

  - ### setTaskId

    public abstract void setTaskId(TaskId taskId)

  - ### setId

    public abstract void setId(int id)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### compareTo

    public int compareTo(TaskAttemptId other)
    Specified by:
      `compareTo` in interface `Comparable<TaskAttemptId>`