HDFS-16223. AvailableSpaceRackFaultTolerantBlockPlacementPolicy should use chooseRandomWithStorageTypeTwoTrial() for better performance. (#3424). Contributed by Ayush Saxena.

This commit is contained in:
Ayush Saxena 2021-09-13 15:24:38 +05:30
parent 3355126062
commit 38f529abf7
No known key found for this signature in database
GPG Key ID: D09AE71061AB564D
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}