HDFS-16223. AvailableSpaceRackFaultTolerantBlockPlacementPolicy should use chooseRandomWithStorageTypeTwoTrial() for better performance. (#3424). Contributed by Ayush Saxena.
This commit is contained in:
parent
3355126062
commit
38f529abf7
|
@ -80,9 +80,9 @@ public class AvailableSpaceRackFaultTolerantBlockPlacementPolicy
|
|||
Preconditions.checkArgument(clusterMap instanceof DFSNetworkTopology);
|
||||
DFSNetworkTopology dfsClusterMap = (DFSNetworkTopology) clusterMap;
|
||||
DatanodeDescriptor a = (DatanodeDescriptor) dfsClusterMap
|
||||
.chooseRandomWithStorageType(scope, excludedNode, type);
|
||||
.chooseRandomWithStorageTypeTwoTrial(scope, excludedNode, type);
|
||||
DatanodeDescriptor b = (DatanodeDescriptor) dfsClusterMap
|
||||
.chooseRandomWithStorageType(scope, excludedNode, type);
|
||||
.chooseRandomWithStorageTypeTwoTrial(scope, excludedNode, type);
|
||||
return select(a, b);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue