code: private void removeBlocks(List<BlockInfo> blocks) {
      if (blocks == null) {
        return;
      }
      for (BlockInfo b : blocks) {
        removeFromExcessReplicateMap(b);
        neededReplications.remove(b, -1);
        corruptReplicas.removeFromCorruptReplicasMap(b);
        if (pendingReplications != null) {
          int replicas = pendingReplications.getNumReplicas(b);
          for (int i = 0; i < replicas; i++) {
            pendingReplications.remove(b);
          }    
        }    
        addToInvalidates(b, false);
        blocksMap.removeBlock(b);
      }
    }
docs: From the given list, incrementally remove the blocks. Add the blocks
  to invalidates, and set a flag that explicit ACK from DataNode is not
  required. This function should be used only for deleting entire files.