org.apache.hadoop.mapreduce.jobhistory
Class JobHistoryCopyService

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.service.CompositeService
          extended by org.apache.hadoop.mapreduce.jobhistory.JobHistoryCopyService
All Implemented Interfaces:
Closeable, 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
JobHistoryCopyService(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.event.EventHandler handler)
           
 
Method Summary
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 Detail

JobHistoryCopyService

public JobHistoryCopyService(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
                             org.apache.hadoop.yarn.event.EventHandler handler)
Method Detail

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.