public class NodesListManager extends AbstractService implements EventHandler<NodesListManagerEvent>
Service.STATE
Constructor and Description |
---|
NodesListManager(RMContext rmContext) |
Modifier and Type | Method and Description |
---|---|
int |
getUnusableNodes(Collection<RMNode> unUsableNodes)
Provides the currently unusable nodes.
|
void |
handle(NodesListManagerEvent event) |
boolean |
isValidNode(String hostName) |
void |
refreshNodes(Configuration yarnConf) |
protected void |
serviceInit(Configuration conf)
All initialization code needed by a service.
|
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
public NodesListManager(RMContext rmContext)
protected void serviceInit(Configuration conf) throws Exception
AbstractService
AbstractService.init(Configuration)
prevents re-entrancy.
The base implementation checks to see if the subclass has created
a new configuration instance, and if so, updates the base class valueserviceInit
in class AbstractService
conf
- configurationException
- on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stoppublic void refreshNodes(Configuration yarnConf) throws IOException
IOException
public boolean isValidNode(String hostName)
public int getUnusableNodes(Collection<RMNode> unUsableNodes)
unUsableNodes
- Collection to which the unusable nodes are addedpublic void handle(NodesListManagerEvent event)
handle
in interface EventHandler<NodesListManagerEvent>
Copyright © 2013 Apache Software Foundation. All rights reserved.