Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8834

TestReplication#testReplicationWhenBlockCorruption is not valid after HDFS-6482

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: datanode
    • Labels:
    • Target Version/s:

      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;
          }
       }
      

        Attachments

          Activity

            People

            • Assignee:
              eddyxu Lei (Eddy) Xu
              Reporter:
              eddyxu Lei (Eddy) Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: