|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClusterStory
ClusterStory
represents all configurations of a MapReduce cluster,
including nodes, network topology, and slot configurations.
Method Summary | |
---|---|
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. |
Method Detail |
---|
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.
a
- b
-
Node
a and Node
b.int getMaximumDistance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |