public class DFSNetworkTopology
extends org.apache.hadoop.net.NetworkTopology
Constructor and Description |
---|
DFSNetworkTopology() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.net.Node |
chooseRandomWithStorageType(String scope,
Collection<org.apache.hadoop.net.Node> excludedNodes,
org.apache.hadoop.fs.StorageType type)
Randomly choose one node from scope, with specified storage type.
|
org.apache.hadoop.net.Node |
chooseRandomWithStorageTypeTwoTrial(String scope,
Collection<org.apache.hadoop.net.Node> excludedNodes,
org.apache.hadoop.fs.StorageType type)
Randomly choose one node from scope with the given storage type.
|
static DFSNetworkTopology |
getInstance(org.apache.hadoop.conf.Configuration conf) |
add, chooseRandom, chooseRandom, chooseRandom, contains, countNumOfAvailableNodes, getDatanodesInRack, getDistance, getDistanceByPath, getFirstHalf, getInstance, getLastHalf, getLeaves, getNode, getNodeForNetworkLocation, getNumOfLeaves, getNumOfRacks, getRack, getWeight, hasClusterEverBeenMultiRack, incrementRacks, init, isNodeGroupAware, isOnSameNodeGroup, isOnSameRack, isSameParents, remove, sortByDistance, sortByDistanceUsingNetworkLocation, toString
public static DFSNetworkTopology getInstance(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.net.Node chooseRandomWithStorageType(String scope, Collection<org.apache.hadoop.net.Node> excludedNodes, org.apache.hadoop.fs.StorageType type)
scope
- range of nodes from which a node will be chosenexcludedNodes
- nodes to be excluded fromtype
- the storage type we search forpublic org.apache.hadoop.net.Node chooseRandomWithStorageTypeTwoTrial(String scope, Collection<org.apache.hadoop.net.Node> excludedNodes, org.apache.hadoop.fs.StorageType type)
scope
- range of nodes from which a node will be chosenexcludedNodes
- nodes to be excluded fromtype
- the storage type we search forCopyright © 2018 Apache Software Foundation. All Rights Reserved.