- The usage of following two variables is unnecessary. We can remove them to make code a bit brief.
private final boolean hasStorageIDs;
private final boolean hasStorageTypes;
HDFS-7647, no need to modify LocatedBlock#getStorageTypes and LocatedBlock#getStorageIDs, we just need to update the cached storageIDs and storageTypes after sort.
- Another thing is we'd better setSoftwareVersion when constructing DatanodeInfoWithStorage from DatanodeInfo