final Path fileName = new Path("/foo1");
DFSTestUtil.createFile(fs, fileName, 2, (short)3, 0L);
DFSTestUtil.waitReplication(fs, fileName, (short)3);
// corrupt the block on datanode 0
Block block = DFSTestUtil.getFirstBlock(fs, fileName);
TestDatanodeBlockScanner.corruptReplica(block.getBlockName(), 0);
File scanLog = new File(System.getProperty("test.build.data"),
"dfs/data/data1/current/dncp_block_verification.log.curr");
assertTrue(scanLog.delete());
// restart the datanode so the corrupt replica will be detected
cluster.restartDataNode(0);