HDFS-15295. AvailableSpaceBlockPlacementPolicy should use chooseRandomWithStorageTypeTwoTrial() for better performance. Contributed by Jinglun.
This commit is contained in:
parent
d4874585f4
commit
453771f170
@ -87,9 +87,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, false);
|
return select(a, b, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user