Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
How about adjust the order of choosing replication to deletion?
Is there any other meaning, choosing "oldestHeartbeatStorage" first?
public DatanodeStorageInfo chooseReplicaToDelete(
Collection<DatanodeStorageInfo> moreThanOne,
Collection<DatanodeStorageInfo> exactlyOne,
final List<StorageType> excessTypes,
Map<String, List<DatanodeStorageInfo>> rackMap) {
......
final DatanodeStorageInfo storage;
if (minSpaceStorage != null)
{ storage = minSpaceStorage; }else if (oldestHeartbeatStorage != null)
{ storage = oldestHeartbeatStorage; }else
{ return null; }excessTypes.remove(storage.getStorageType());
return storage;
}