LOG.info("Reporting bad block " + block + " to namenode.");
try {
DatanodeInfo[] dnArr = { new DatanodeInfo(datanode.getDNRegistrationForNS(namespaceId)) };
LocatedBlock[] blocks = { new LocatedBlock(block, dnArr) };
datanode.reportBadBlocks(namespaceId,blocks);
} catch (IOException e){
/* One common reason is that NameNode could be in safe mode.
* Should we keep on retrying in that case?
*/