org.apache.hadoop.yarn.server.resourcemanager
Class NodesListManager

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.yarn.server.resourcemanager.NodesListManager
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.event.EventHandler<NodesListManagerEvent>

public class NodesListManager
extends org.apache.hadoop.service.AbstractService
implements org.apache.hadoop.yarn.event.EventHandler<NodesListManagerEvent>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Constructor Summary
NodesListManager(RMContext rmContext)
           
 
Method Summary
 int getUnusableNodes(Collection<RMNode> unUsableNodes)
          Provides the currently unusable nodes.
 void handle(NodesListManagerEvent event)
           
 boolean isValidNode(String hostName)
           
 void refreshNodes(org.apache.hadoop.conf.Configuration yarnConf)
           
protected  void serviceInit(org.apache.hadoop.conf.Configuration conf)
           
 
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, serviceStart, serviceStop, 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

NodesListManager

public NodesListManager(RMContext rmContext)
Method Detail

serviceInit

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

refreshNodes

public void refreshNodes(org.apache.hadoop.conf.Configuration yarnConf)
                  throws IOException
Throws:
IOException

isValidNode

public boolean isValidNode(String hostName)

getUnusableNodes

public int getUnusableNodes(Collection<RMNode> unUsableNodes)
Provides the currently unusable nodes. Copies it into provided collection.

Parameters:
unUsableNodes - Collection to which the unusable nodes are added
Returns:
number of unusable nodes added

handle

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.