HDFS-16223. AvailableSpaceRackFaultTolerantBlockPlacementPolicy should use chooseRandomWithStorageTypeTwoTrial() for better performance. (#3424). Contributed by Ayush Saxena.
This commit is contained in:
parent
356ebbbe80
commit
17c58ac959
@ -80,9 +80,9 @@ protected DatanodeDescriptor chooseDataNode(final String scope,
|
|||||||
Preconditions.checkArgument(clusterMap instanceof DFSNetworkTopology);
|
Preconditions.checkArgument(clusterMap instanceof DFSNetworkTopology);
|
||||||
DFSNetworkTopology dfsClusterMap = (DFSNetworkTopology) clusterMap;
|
DFSNetworkTopology dfsClusterMap = (DFSNetworkTopology) clusterMap;
|
||||||
DatanodeDescriptor a = (DatanodeDescriptor) dfsClusterMap
|
DatanodeDescriptor a = (DatanodeDescriptor) dfsClusterMap
|
||||||
.chooseRandomWithStorageType(scope, excludedNode, type);
|
.chooseRandomWithStorageTypeTwoTrial(scope, excludedNode, type);
|
||||||
DatanodeDescriptor b = (DatanodeDescriptor) dfsClusterMap
|
DatanodeDescriptor b = (DatanodeDescriptor) dfsClusterMap
|
||||||
.chooseRandomWithStorageType(scope, excludedNode, type);
|
.chooseRandomWithStorageTypeTwoTrial(scope, excludedNode, type);
|
||||||
return select(a, b);
|
return select(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user