/** removes a specified block from MiniDFS storage and reports it as corrupt */ private void removeAndReportBlock( DistributedFileSystem blockDfs, Path filePath, LocatedBlock block) throws IOException { TestRaidDfs.corruptBlock(filePath, block.getBlock(), NUM_DATANODES, true); // report deleted block to the name node LocatedBlock[] toReport = {block}; blockDfs.getClient().namenode.reportBadBlocks(toReport); }