Currently we use TreeMap for corruptReplicasMap, actually the only need sorted place is getCorruptReplicaBlockIds which is used by test.
So we can use HashMap.
From memory and performance view, HashMap is better than TreeMap, a simliar optimization
HDFS-7433. Of course we need to make few change to getCorruptReplicaBlockIds.