org.apache.hadoop.mapreduce.jobhistory

## Class AMStartedEvent

- java.lang.Object
- - org.apache.hadoop.mapreduce.jobhistory.AMStartedEvent

- All Implemented Interfaces:
    HistoryEvent

      @InterfaceAudience.Private
       @InterfaceStability.Unstable
      public class AMStartedEvent
      extends Object
      implements HistoryEvent

  Event to record start of a task attempt

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AMStartedEvent(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, long startTime, org.apache.hadoop.yarn.api.records.ContainerId containerId, String nodeManagerHost, int nodeManagerPort, int nodeManagerHttpPort, long submitTime)` Create an event to record the start of an MR AppMaster
    `AMStartedEvent(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, long startTime, org.apache.hadoop.yarn.api.records.ContainerId containerId, String nodeManagerHost, int nodeManagerPort, int nodeManagerHttpPort, String forcedJobStateOnShutDown, long submitTime)` Create an event to record the start of an MR AppMaster

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hadoop.yarn.api.records.ApplicationAttemptId` | `getAppAttemptId()`
    `org.apache.hadoop.yarn.api.records.ContainerId` | `getContainerId()`
    `Object` | `getDatum()` Return the Avro datum wrapped by this.
    `EventType` | `getEventType()` Get the attempt id
    `String` | `getForcedJobStateOnShutDown()`
    `String` | `getNodeManagerHost()`
    `int` | `getNodeManagerHttpPort()`
    `int` | `getNodeManagerPort()`
    `long` | `getStartTime()`
    `long` | `getSubmitTime()`
    `Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric>` | `getTimelineMetrics()` Counters or Metrics if any else return null.
    `void` | `setDatum(Object datum)` Set the Avro datum wrapped by this.
    `org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent` | `toTimelineEvent()` Map HistoryEvent to TimelineEvent.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AMStartedEvent

          public AMStartedEvent(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                long startTime,
                                org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                String nodeManagerHost,
                                int nodeManagerPort,
                                int nodeManagerHttpPort,
                                long submitTime)

      Create an event to record the start of an MR AppMaster
      Parameters:
        `appAttemptId` - the application attempt id.
        `startTime` - the start time of the AM.
        `containerId` - the containerId of the AM.
        `nodeManagerHost` - the node on which the AM is running.
        `nodeManagerPort` - the port on which the AM is running.
        `nodeManagerHttpPort` - the httpPort for the node running the AM.

    - #### AMStartedEvent

          public AMStartedEvent(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                long startTime,
                                org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                String nodeManagerHost,
                                int nodeManagerPort,
                                int nodeManagerHttpPort,
                                String forcedJobStateOnShutDown,
                                long submitTime)

      Create an event to record the start of an MR AppMaster
      Parameters:
        `appAttemptId` - the application attempt id.
        `startTime` - the start time of the AM.
        `containerId` - the containerId of the AM.
        `nodeManagerHost` - the node on which the AM is running.
        `nodeManagerPort` - the port on which the AM is running.
        `nodeManagerHttpPort` - the httpPort for the node running the AM.
        `forcedJobStateOnShutDown` - the state to force the job into

  - ### Method Detail

    - #### getDatum

          public Object getDatum()

      Description copied from interface: `HistoryEvent`
      Return the Avro datum wrapped by this.
      Specified by:
        `getDatum` in interface `HistoryEvent`

    - #### setDatum

          public void setDatum(Object datum)

      Description copied from interface: `HistoryEvent`
      Set the Avro datum wrapped by this.
      Specified by:
        `setDatum` in interface `HistoryEvent`

    - #### getAppAttemptId

          public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAppAttemptId()

      Returns:
        the ApplicationAttemptId

    - #### getStartTime

          public long getStartTime()

      Returns:
        the start time for the MRAppMaster

    - #### getContainerId

          public org.apache.hadoop.yarn.api.records.ContainerId getContainerId()

      Returns:
        the ContainerId for the MRAppMaster.

    - #### getNodeManagerHost

          public String getNodeManagerHost()

      Returns:
        the node manager host.

    - #### getNodeManagerPort

          public int getNodeManagerPort()

      Returns:
        the node manager port.

    - #### getNodeManagerHttpPort

          public int getNodeManagerHttpPort()

      Returns:
        the http port for the tracker.

    - #### getForcedJobStateOnShutDown

          public String getForcedJobStateOnShutDown()

      Returns:
        the state to force the job into

    - #### getSubmitTime

          public long getSubmitTime()

      Returns:
        the submit time for the Application(Job)

    - #### getEventType

          public EventType getEventType()

      Get the attempt id
      Specified by:
        `getEventType` in interface `HistoryEvent`

    - #### toTimelineEvent

          public org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent toTimelineEvent()

      Description copied from interface: `HistoryEvent`
      Map HistoryEvent to TimelineEvent.
      Specified by:
        `toTimelineEvent` in interface `HistoryEvent`
      Returns:
        the timeline event

    - #### getTimelineMetrics

          public Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric> getTimelineMetrics()

      Description copied from interface: `HistoryEvent`
      Counters or Metrics if any else return null.
      Specified by:
        `getTimelineMetrics` in interface `HistoryEvent`
      Returns:
        the set of timeline metrics

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