org.apache.hadoop.tools.rumen
Class RackNode
java.lang.Object
org.apache.hadoop.tools.rumen.Node
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.
RackNode
public RackNode(String name,
int level)
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