boolean removeFromCorruptReplicasMap ( Block blk , DatanodeDescriptor datanode ) { Collection < DatanodeDescriptor > datanodes = corruptReplicasMap . get ( blk ) ; if ( datanodes == null ) return false ; if ( datanodes . remove ( datanode ) ) { // remove the replicas if ( datanodes . isEmpty ( ) ) { // remove the block if there is no more corrupted replicas corruptReplicasMap . remove ( blk ) ; } return true ; } return false ; }
Remove the block at the given datanode from CorruptBlockMap