org.apache.hadoop.mapreduce.v2.app.job

## Interface TaskAttempt

- All Known Implementing Classes:
    MapTaskAttemptImpl, ReduceTaskAttemptImpl, TaskAttemptImpl

      public interface TaskAttempt

  Read only view of TaskAttempt.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hadoop.yarn.api.records.ContainerId` | `getAssignedContainerID()`
    `String` | `getAssignedContainerMgrAddress()`
    `org.apache.hadoop.mapreduce.Counters` | `getCounters()`
    `List<String>` | `getDiagnostics()`
    `long` | `getFinishTime()`
    `org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId` | `getID()`
    `long` | `getLaunchTime()`
    `String` | `getNodeHttpAddress()`
    `org.apache.hadoop.yarn.api.records.NodeId` | `getNodeId()`
    `String` | `getNodeRackName()`
    `org.apache.hadoop.mapreduce.v2.api.records.Phase` | `getPhase()`
    `float` | `getProgress()`
    `org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptReport` | `getReport()`
    `long` | `getShuffleFinishTime()`
    `int` | `getShufflePort()`
    `long` | `getSortFinishTime()`
    `org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptState` | `getState()`
    `boolean` | `isFinished()` Has attempt reached the final state or not.

- - ### Method Detail

    - #### getID

          org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId getID()

    - #### getReport

          org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptReport getReport()

    - #### getDiagnostics

          List<String> getDiagnostics()

    - #### getCounters

          org.apache.hadoop.mapreduce.Counters getCounters()

    - #### getProgress

          float getProgress()

    - #### getPhase

          org.apache.hadoop.mapreduce.v2.api.records.Phase getPhase()

    - #### getState

          org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptState getState()

    - #### isFinished

          boolean isFinished()

      Has attempt reached the final state or not.
      Returns:
        true if it has finished, else false

    - #### getAssignedContainerID

          org.apache.hadoop.yarn.api.records.ContainerId getAssignedContainerID()

      Returns:
        the container ID if a container is assigned, otherwise null.

    - #### getAssignedContainerMgrAddress

          String getAssignedContainerMgrAddress()

      Returns:
        container mgr address if a container is assigned, otherwise null.

    - #### getNodeId

          org.apache.hadoop.yarn.api.records.NodeId getNodeId()

      Returns:
        node's id if a container is assigned, otherwise null.

    - #### getNodeHttpAddress

          String getNodeHttpAddress()

      Returns:
        node's http address if a container is assigned, otherwise null.

    - #### getNodeRackName

          String getNodeRackName()

      Returns:
        node's rack name if a container is assigned, otherwise null.

    - #### getLaunchTime

          long getLaunchTime()

      Returns:
        time at which container is launched. If container is not launched yet, returns 0.

    - #### getFinishTime

          long getFinishTime()

      Returns:
        attempt's finish time. If attempt is not finished yet, returns 0.

    - #### getShuffleFinishTime

          long getShuffleFinishTime()

      Returns:
        The attempt's shuffle finish time if the attempt is a reduce. If attempt is not finished yet, returns 0.

    - #### getSortFinishTime

          long getSortFinishTime()

      Returns:
        The attempt's sort or merge finish time if the attempt is a reduce. If attempt is not finished yet, returns 0.

    - #### getShufflePort

          int getShufflePort()

      Returns:
        the port shuffle is on.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.