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 committed by GitHub
parent 356ebbbe80
commit 17c58ac959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}