smarthanwang commented on code in PR #5564: URL: https://github.com/apache/hadoop/pull/5564#discussion_r1179874552
########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java: ########## @@ -1919,4 +1919,63 @@ public void delayDeleteReplica() { DataNodeFaultInjector.set(oldInjector); } } + + /** + * Test the block file which is not found when disk with some exception. + * We expect: + * 1. block file wouldn't be deleted from disk. + * 2. block info would be removed from dn memory. + * 3. block would be reported to nn as missing block. + * 4. block would be recovered when disk back to normal. + */ + @Test + public void tesInvalidateMissingBlock() throws Exception { + long blockSize = 1024; + int heatbeatInterval = 1; + HdfsConfiguration c = new HdfsConfiguration(); + c.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, heatbeatInterval); Review Comment: These have no more purpose, just some init codes copy. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org