Package org.apache.storm.scheduler.resource

## Class RasNodes

- java.lang.Object
- - org.apache.storm.scheduler.resource.RasNodes

-     public class RasNodes
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RasNodes​(Cluster cluster)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `freeSlots​(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.
    `RasNode` | `getNodeById​(String nodeId)` | get node object from nodeId.
    `Map<String,​String>` | `getNodeIdToHostname()` | Get a map from RasNodeId to HostName.
    `Collection<RasNode>` | `getNodes()` |
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RasNodes

          public RasNodes​(Cluster cluster)

  - ### Method Detail

    - #### getAllNodesFrom

          public static Map<String,​RasNode> getAllNodesFrom​(Cluster cluster)

    - #### getNodeById

          public RasNode getNodeById​(String nodeId)

      get node object from nodeId.

    - #### 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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`