Class RasNodes
- java.lang.Object
-
- org.apache.storm.scheduler.resource.RasNodes
-
public class RasNodes extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfreeSlots(Collection<WorkerSlot> workerSlots)Free everything on the given slots.static Map<String,RasNode>getAllNodesFrom(Cluster cluster)Map<String,List<RasNode>>getHostnameToNodes()Get a map with list of RasNode for each hostname.RasNodegetNodeById(String nodeId)get node object from nodeId.Map<String,String>getNodeIdToHostname()Get a map from RasNodeId to HostName.Collection<RasNode>getNodes()StringtoString()
-
-
-
Constructor Detail
-
RasNodes
public RasNodes(Cluster cluster)
-
-
Method Detail
-
freeSlots
public void freeSlots(Collection<WorkerSlot> workerSlots)
Free everything on the given slots.- Parameters:
workerSlots- the slots to free
-
getNodes
public Collection<RasNode> getNodes()
-
getHostnameToNodes
public Map<String,List<RasNode>> getHostnameToNodes()
Get a map with list of RasNode for each hostname.- Returns:
- map of hostname to a list of RasNode
-
getNodeIdToHostname
public Map<String,String> getNodeIdToHostname()
Get a map from RasNodeId to HostName.- Returns:
- map of nodeId to hostname
-
-