Details
-
Test
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.7.1
Description
TestReplication#testReplicationWhenBlockCorruption assumes DN has one level of directory:
File[] listFiles = participatedNodeDirs.listFiles();
However, HDFS-6482 changed the layout of block directories and used two level directories, which makes the following code invalidate (not running).
for (File file : listFiles) { if (file.getName().startsWith(Block.BLOCK_FILE_PREFIX) && !file.getName().endsWith("meta")) { blockFile = file.getName(); for (File file1 : nonParticipatedNodeDirs) { file1.mkdirs(); new File(file1, blockFile).createNewFile(); new File(file1, blockFile + "_1000.meta").createNewFile(); } break; } }