HDFS-15295. AvailableSpaceBlockPlacementPolicy should use chooseRandomWithStorageTypeTwoTrial() for better performance. Contributed by Jinglun.
(cherry picked from commit453771f170
) (cherry picked from commitd6c48f8100
) (cherry picked from commit9e3b4c9ebd
)
This commit is contained in:
parent
03ff1d3bd8
commit
6f7a30fd71
|
@ -87,9 +87,9 @@ public class AvailableSpaceBlockPlacementPolicy extends
|
|||
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, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue