public interface ClusterStory
ClusterStory
represents all configurations of a MapReduce cluster,
including nodes, network topology, and slot configurations.限定符和类型 | 方法和说明 |
---|---|
int |
distance(Node a,
Node b)
Determine the distance between two
Node s. |
Node |
getClusterTopology()
Get the cluster topology tree.
|
MachineNode |
getMachineByName(String name)
Get
MachineNode by its host name. |
Set<MachineNode> |
getMachines()
Get all machines of the cluster.
|
int |
getMaximumDistance()
Get the maximum distance possible between any two nodes.
|
RackNode |
getRackByName(String name)
Get
RackNode by its name. |
Set<RackNode> |
getRacks()
Get all racks of the cluster.
|
MachineNode[] |
getRandomMachines(int expected,
Random random)
Select a random set of machines.
|
Set<MachineNode> getMachines()
Set<RackNode> getRacks()
Node getClusterTopology()
MachineNode[] getRandomMachines(int expected, Random random)
expected
- The expected sample size.random
- Random number generator to use.MachineNode
s.MachineNode getMachineByName(String name)
MachineNode
by its host name.MachineNode
with the same name. Or null if not found.RackNode getRackByName(String name)
RackNode
by its name.RackNode
with the same name. Or null if not found.int distance(Node a, Node b)
Node
s. Currently, the distance
is loosely defined as the length of the longer path for either a or b to
reach their common ancestor.int getMaximumDistance()
Copyright © 2009 The Apache Software Foundation