org.apache.hadoop.mapreduce.jobhistory

## Class JobUnsuccessfulCompletionEvent

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

- All Implemented Interfaces:
    HistoryEvent

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

  Event to record Failed and Killed completion of jobs

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobUnsuccessfulCompletionEvent(JobID id, long finishTime, int succeededMaps, int succeededReduces, int failedMaps, int failedReduces, int killedMaps, int killedReduces, String status)` Create an event to record unsuccessful completion (killed/failed) of jobs
    `JobUnsuccessfulCompletionEvent(JobID id, long finishTime, int succeededMaps, int succeededReduces, int failedMaps, int failedReduces, int killedMaps, int killedReduces, String status, Iterable<String> diagnostics)` Create an event to record unsuccessful completion (killed/failed) of jobs

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getDatum()` Return the Avro datum wrapped by this.
    `String` | `getDiagnostics()` Retrieves diagnostics information preserved in the history file
    `EventType` | `getEventType()` Get the event type
    `int` | `getFailedMaps()` Get the number of failed maps
    `int` | `getFailedReduces()` Get the number of failed reduces
    `long` | `getFinishTime()` Get the job finish time
    `JobID` | `getJobId()` Get the Job ID
    `int` | `getKilledMaps()` Get the number of killed maps
    `int` | `getKilledReduces()` Get the number of killed reduces
    `String` | `getStatus()` Get the status
    `int` | `getSucceededMaps()` Get the number of succeeded maps
    `int` | `getSucceededReduces()` Get the number of succeeded reduces
    `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

    - #### JobUnsuccessfulCompletionEvent

          public JobUnsuccessfulCompletionEvent(JobID id,
                                                long finishTime,
                                                int succeededMaps,
                                                int succeededReduces,
                                                int failedMaps,
                                                int failedReduces,
                                                int killedMaps,
                                                int killedReduces,
                                                String status)

      Create an event to record unsuccessful completion (killed/failed) of jobs
      Parameters:
        `id` - Job ID
        `finishTime` - Finish time of the job
        `succeededMaps` - Number of succeeded maps
        `succeededReduces` - Number of succeeded reduces
        `failedMaps` - Number of failed maps
        `failedReduces` - Number of failed reduces
        `killedMaps` - Number of killed maps
        `killedReduces` - Number of killed reduces
        `status` - Status of the job

    - #### JobUnsuccessfulCompletionEvent

          public JobUnsuccessfulCompletionEvent(JobID id,
                                                long finishTime,
                                                int succeededMaps,
                                                int succeededReduces,
                                                int failedMaps,
                                                int failedReduces,
                                                int killedMaps,
                                                int killedReduces,
                                                String status,
                                                Iterable<String> diagnostics)

      Create an event to record unsuccessful completion (killed/failed) of jobs
      Parameters:
        `id` - Job ID
        `finishTime` - Finish time of the job
        `succeededMaps` - Number of finished maps
        `succeededReduces` - Number of finished reduces
        `failedMaps` - Number of failed maps
        `failedReduces` - Number of failed reduces
        `killedMaps` - Number of killed maps
        `killedReduces` - Number of killed reduces
        `status` - Status of the job
        `diagnostics` - job runtime diagnostics

  - ### 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`

    - #### getJobId

          public JobID getJobId()

      Get the Job ID

    - #### getFinishTime

          public long getFinishTime()

      Get the job finish time

    - #### getSucceededMaps

          public int getSucceededMaps()

      Get the number of succeeded maps

    - #### getSucceededReduces

          public int getSucceededReduces()

      Get the number of succeeded reduces

    - #### getFailedMaps

          public int getFailedMaps()

      Get the number of failed maps

    - #### getFailedReduces

          public int getFailedReduces()

      Get the number of failed reduces

    - #### getKilledMaps

          public int getKilledMaps()

      Get the number of killed maps

    - #### getKilledReduces

          public int getKilledReduces()

      Get the number of killed reduces

    - #### getStatus

          public String getStatus()

      Get the status

    - #### getEventType

          public EventType getEventType()

      Get the event type
      Specified by:
        `getEventType` in interface `HistoryEvent`

    - #### getDiagnostics

          public String getDiagnostics()

      Retrieves diagnostics information preserved in the history file
      Returns:
        diagnostics as of the time of job termination

    - #### 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.