You can reference this function, it remove excess replicas form the map.
public void removeStoredBlock(Block block, DatanodeDescriptor node)
2013/4/12 lei liu
>
> I use hadoop-2.0.3. I find when on block is over-replicated, the replicas
> to be add to excessReplicateMap attribute of Blockma
I use hadoop-2.0.3. I find when on block is over-replicated, the replicas
to be add to excessReplicateMap attribute of Blockmanager. But when the
block is deleted or the block has the intended number of replicas, the
replicas is not deleted form excessReplicateMap attribute.
I think this is bug.