org.apache.hadoop.tools.rumen
Class RackNode

java.lang.Object
  extended by org.apache.hadoop.tools.rumen.Node
      extended by org.apache.hadoop.tools.rumen.RackNode
All Implemented Interfaces:
Comparable<Node>

public final class RackNode
extends Node

RackNode represents a rack node in the cluster topology.


Constructor Summary
RackNode(String name, int level)
           
 
Method Summary
 boolean addChild(Node child)
          Add a child node to this node.
 Set<MachineNode> getMachinesInRack()
          Get the machine nodes that belong to the rack.
 
Methods inherited from class org.apache.hadoop.tools.rumen.Node
compareTo, equals, getChildren, getLevel, getName, getParent, hasChildren, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RackNode

public RackNode(String name,
                int level)
Method Detail

addChild

public boolean addChild(Node child)
Description copied from class: Node
Add a child node to this node.

Overrides:
addChild in class Node
Parameters:
child - The child node to be added. The child node should currently not be belong to another cluster topology.
Returns:
Boolean indicating whether the node is successfully added.

getMachinesInRack

public Set<MachineNode> getMachinesInRack()
Get the machine nodes that belong to the rack.

Returns:
The machine nodes that belong to the rack.


Copyright © 2009 The Apache Software Foundation