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

TestReplication#testReplicationWhenBlockCorruption is not valid after HDFS-6482

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.1
    • 2.8.0, 3.0.0-alpha1
    • datanode

    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

        1. HDFS-8834.00.patch
          3 kB
          Lei (Eddy) Xu

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: