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

        Activity

        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        Use Files#walkFileTree to collect block files and add asserts to make sure the tests have been called.

        Show
        eddyxu Lei (Eddy) Xu added a comment - Use Files#walkFileTree to collect block files and add asserts to make sure the tests have been called.
        Hide
        hitliuyi Yi Liu added a comment -

        +1, pending Jenkins, thanks Lei.

        Show
        hitliuyi Yi Liu added a comment - +1, pending Jenkins, thanks Lei.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 8m 8s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 7m 53s There were no new javac warning messages.
        +1 release audit 0m 21s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 23s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 22s mvn install still works.
        +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
        +1 findbugs 2m 29s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 1m 8s Pre-build of native portion
        -1 hdfs tests 174m 8s Tests failed in hadoop-hdfs.
            197m 27s  



        Reason Tests
        Failed unit tests hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider
        Timed out tests org.apache.hadoop.hdfs.TestPread



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12747685/HDFS-8834.00.patch
        Optional Tests javac unit findbugs checkstyle
        git revision trunk / 69b0957
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11860/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11860/testReport/
        Java 1.7.0_55
        uname Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11860/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 8m 8s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 7m 53s There were no new javac warning messages. +1 release audit 0m 21s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 23s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 22s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 2m 29s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 1m 8s Pre-build of native portion -1 hdfs tests 174m 8s Tests failed in hadoop-hdfs.     197m 27s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider Timed out tests org.apache.hadoop.hdfs.TestPread Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12747685/HDFS-8834.00.patch Optional Tests javac unit findbugs checkstyle git revision trunk / 69b0957 hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11860/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11860/testReport/ Java 1.7.0_55 uname Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11860/console This message was automatically generated.
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        Thanks a lot for the quick review, Yi Liu! This patch only changes the test TestReplication, thus these two failure tests are not related.

        I've committed this to trunk and branch-2.

        Show
        eddyxu Lei (Eddy) Xu added a comment - Thanks a lot for the quick review, Yi Liu ! This patch only changes the test TestReplication , thus these two failure tests are not related. I've committed this to trunk and branch-2.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8236 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8236/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8236 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8236/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #271 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/271/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #271 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/271/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #1001 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1001/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1001 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1001/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2198 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2198/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2198 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2198/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #260 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/260/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #260 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/260/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #268 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/268/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #268 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/268/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2217 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2217/)
        HDFS-8834. TestReplication is not valid after HDFS-6482. (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2217 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2217/ ) HDFS-8834 . TestReplication is not valid after HDFS-6482 . (Contributed by Lei Xu) (lei: rev f4f1b8b267703b8bebab06e17e69a4a4de611592) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReplication.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development