JobHistoryCopyService (Apache Hadoop MapReduce App 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapreduce.jobhistory, class: JobHistoryCopyService

Package org.apache.hadoop.mapreduce.jobhistory

# Class JobHistoryCopyService

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.mapreduce.jobhistory.JobHistoryCopyService

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `org.apache.hadoop.mapreduce.jobhistory.HistoryEventHandler`, `org.apache.hadoop.service.Service`

public class JobHistoryCopyService extends org.apache.hadoop.service.CompositeService implements org.apache.hadoop.mapreduce.jobhistory.HistoryEventHandler
Reads in history events from the JobHistoryFile and sends them out again to be recorded.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService

  `org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHook`

  ## Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

  `org.apache.hadoop.service.Service.STATE`

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.service.CompositeService

  `STOP_ONLY_STARTED_SERVICES`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JobHistoryCopyService(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.event.EventHandler<org.apache.hadoop.yarn.event.Event> handler)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static org.apache.hadoop.fs.FSDataInputStream`
  `getPreviousJobHistoryFileStream(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)`
  `void`
  `handleEvent(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event)`
  `protected void`
  `serviceInit(org.apache.hadoop.conf.Configuration conf)`
  `protected void`
  `serviceStart()`

  ### Methods inherited from class org.apache.hadoop.service.CompositeService

  `addIfService, addService, getServices, removeService, serviceStop`

  ### Methods inherited from class org.apache.hadoop.service.AbstractService

  `close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop`

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

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

- ## Constructor Details

  - ### JobHistoryCopyService

    public JobHistoryCopyService(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.event.EventHandler<org.apache.hadoop.yarn.event.Event> handler)

- ## Method Details

  - ### serviceInit

    protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
    Overrides:
      `serviceInit` in class `org.apache.hadoop.service.CompositeService`
    Throws:
      `Exception`

  - ### handleEvent

    public void handleEvent(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event) throws IOException
    Specified by:
      `handleEvent` in interface `org.apache.hadoop.mapreduce.jobhistory.HistoryEventHandler`
    Throws:
      `IOException`

  - ### serviceStart

    protected void serviceStart() throws Exception
    Overrides:
      `serviceStart` in class `org.apache.hadoop.service.CompositeService`
    Throws:
      `Exception`

  - ### getPreviousJobHistoryFileStream

    public static org.apache.hadoop.fs.FSDataInputStream getPreviousJobHistoryFileStream(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) throws IOException
    Throws:
      `IOException`