org.apache.hadoop.yarn.server.resourcemanager.ahs
Class RMApplicationHistoryWriter

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.service.CompositeService
          extended by org.apache.hadoop.yarn.server.resourcemanager.ahs.RMApplicationHistoryWriter
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class RMApplicationHistoryWriter
extends org.apache.hadoop.service.CompositeService

ResourceManager uses this class to write the information of RMApp, RMAppAttempt and RMContainer. These APIs are non-blocking, and just schedule a writing history event. An self-contained dispatcher vector will handle the event in separate threads, and extract the required fields that are going to be persisted. Then, the extracted information will be persisted via the implementation of ApplicationHistoryStore.


Nested Class Summary
protected static class RMApplicationHistoryWriter.MultiThreadedDispatcher
           
 
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
static org.apache.commons.logging.Log LOG
           
 
Fields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES
 
Constructor Summary
RMApplicationHistoryWriter()
           
 
Method Summary
 void applicationAttemptFinished(RMAppAttempt appAttempt, RMAppAttemptState finalState)
           
 void applicationAttemptStarted(RMAppAttempt appAttempt)
           
 void applicationFinished(RMApp app, RMAppState finalState)
           
 void applicationStarted(RMApp app)
           
 void containerFinished(RMContainer container)
           
 void containerStarted(RMContainer container)
           
protected  org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryStore createApplicationHistoryStore(org.apache.hadoop.conf.Configuration conf)
           
protected  org.apache.hadoop.yarn.event.Dispatcher createDispatcher(org.apache.hadoop.conf.Configuration conf)
           
protected  void handleWritingApplicationHistoryEvent(WritingApplicationHistoryEvent event)
           
protected  void serviceInit(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, serviceStart, 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
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

RMApplicationHistoryWriter

public RMApplicationHistoryWriter()
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

createDispatcher

protected org.apache.hadoop.yarn.event.Dispatcher createDispatcher(org.apache.hadoop.conf.Configuration conf)

createApplicationHistoryStore

protected org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryStore createApplicationHistoryStore(org.apache.hadoop.conf.Configuration conf)

handleWritingApplicationHistoryEvent

protected void handleWritingApplicationHistoryEvent(WritingApplicationHistoryEvent event)

applicationStarted

public void applicationStarted(RMApp app)

applicationFinished

public void applicationFinished(RMApp app,
                                RMAppState finalState)

applicationAttemptStarted

public void applicationAttemptStarted(RMAppAttempt appAttempt)

applicationAttemptFinished

public void applicationAttemptFinished(RMAppAttempt appAttempt,
                                       RMAppAttemptState finalState)

containerStarted

public void containerStarted(RMContainer container)

containerFinished

public void containerFinished(RMContainer container)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.