org.apache.hadoop.yarn.server.nodemanager.containermanager
Class AuxServices

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service, org.apache.hadoop.service.ServiceStateChangeListener, org.apache.hadoop.yarn.event.EventHandler<AuxServicesEvent>

public class AuxServices
extends org.apache.hadoop.service.AbstractService
implements org.apache.hadoop.service.ServiceStateChangeListener, org.apache.hadoop.yarn.event.EventHandler<AuxServicesEvent>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Field Summary
protected  Map<String,org.apache.hadoop.yarn.server.api.AuxiliaryService> serviceMap
           
protected  Map<String,ByteBuffer> serviceMetaData
           
 
Constructor Summary
AuxServices()
           
 
Method Summary
protected  void addService(String name, org.apache.hadoop.yarn.server.api.AuxiliaryService service)
           
 Map<String,ByteBuffer> getMetaData()
           
 void handle(AuxServicesEvent event)
           
 void serviceInit(org.apache.hadoop.conf.Configuration conf)
           
 void serviceStart()
           
 void serviceStop()
           
 void stateChanged(org.apache.hadoop.service.Service service)
           
 
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

serviceMap

protected final Map<String,org.apache.hadoop.yarn.server.api.AuxiliaryService> serviceMap

serviceMetaData

protected final Map<String,ByteBuffer> serviceMetaData
Constructor Detail

AuxServices

public AuxServices()
Method Detail

addService

protected final void addService(String name,
                                org.apache.hadoop.yarn.server.api.AuxiliaryService service)

getMetaData

public Map<String,ByteBuffer> getMetaData()
Returns:
the meta data for all registered services, that have been started. If a service has not been started no metadata will be available. The key is the name of the service as defined in the configuration.

serviceInit

public void serviceInit(org.apache.hadoop.conf.Configuration conf)
                 throws Exception
Overrides:
serviceInit in class org.apache.hadoop.service.AbstractService
Throws:
Exception

serviceStart

public void serviceStart()
                  throws Exception
Overrides:
serviceStart in class org.apache.hadoop.service.AbstractService
Throws:
Exception

serviceStop

public void serviceStop()
                 throws Exception
Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService
Throws:
Exception

stateChanged

public void stateChanged(org.apache.hadoop.service.Service service)
Specified by:
stateChanged in interface org.apache.hadoop.service.ServiceStateChangeListener

handle

public void handle(AuxServicesEvent event)
Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<AuxServicesEvent>


Copyright © 2014 Apache Software Foundation. All Rights Reserved.