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

Remove setBlocks API from INodeFile and misc code cleanup

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The public INodeFile#setBlocks API, when used outside INodeFile, is always called with null. Therefore we should replace it with a safer clearBlocks API. Also merging code cleanups from HDFS-7285 branch.

      1. HDFS-8751.00.patch
        5 kB
        Zhe Zhang
      2. HDFS-8751.01.patch
        6 kB
        Zhe Zhang

        Activity

        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 22m 9s 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 10m 7s There were no new javac warning messages.
        +1 javadoc 11m 8s There were no new javadoc warning messages.
        +1 release audit 0m 25s The applied patch does not increase the total number of release audit warnings.
        -1 checkstyle 1m 38s The applied patch generated 1 new checkstyle issues (total was 41, now 38).
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 42s mvn install still works.
        +1 eclipse:eclipse 0m 48s The patch built with eclipse:eclipse.
        +1 findbugs 3m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 3m 46s Pre-build of native portion
        -1 hdfs tests 77m 27s Tests failed in hadoop-hdfs.
            132m 19s  



        Reason Tests
        Failed unit tests hadoop.hdfs.server.namenode.ha.TestStandbyIsHot
        Timed out tests org.apache.hadoop.hdfs.TestEncryptedTransfer



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12744650/HDFS-8751.00.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / d66302e
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/11655/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11655/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11655/testReport/
        Java 1.7.0_55
        uname Linux asf908.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/11655/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 22m 9s 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 10m 7s There were no new javac warning messages. +1 javadoc 11m 8s There were no new javadoc warning messages. +1 release audit 0m 25s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 1m 38s The applied patch generated 1 new checkstyle issues (total was 41, now 38). +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 42s mvn install still works. +1 eclipse:eclipse 0m 48s The patch built with eclipse:eclipse. +1 findbugs 3m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 3m 46s Pre-build of native portion -1 hdfs tests 77m 27s Tests failed in hadoop-hdfs.     132m 19s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.ha.TestStandbyIsHot Timed out tests org.apache.hadoop.hdfs.TestEncryptedTransfer Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12744650/HDFS-8751.00.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / d66302e checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/11655/artifact/patchprocess/diffcheckstylehadoop-hdfs.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11655/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11655/testReport/ Java 1.7.0_55 uname Linux asf908.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/11655/console This message was automatically generated.
        Hide
        rakeshr Rakesh R added a comment -

        Thanks Zhe Zhang. Just few minor comments:

        1. Could you change
          /** Set the blocks. */

          to

          /** Clear the blocks. */

          .

        2. There is one minor checkstyle warning, please fix the same.

        +1 (non-binding) once this is addressed.

        Show
        rakeshr Rakesh R added a comment - Thanks Zhe Zhang . Just few minor comments: Could you change /** Set the blocks. */ to /** Clear the blocks. */ . There is one minor checkstyle warning, please fix the same. +1 (non-binding) once this is addressed.
        Hide
        zhz Zhe Zhang added a comment -

        Thanks Rakesh for reviewing the patch! Updating the patch to address the the wrong comment message and checkstyle issue. The test failure and timeout are unrelated and pass fine locally. The new patch also corrects a mistake in the new test.

        Show
        zhz Zhe Zhang added a comment - Thanks Rakesh for reviewing the patch! Updating the patch to address the the wrong comment message and checkstyle issue. The test failure and timeout are unrelated and pass fine locally. The new patch also corrects a mistake in the new test.
        Hide
        jingzhao Jing Zhao added a comment -

        +1 pending Jenkins.

        Show
        jingzhao Jing Zhao added a comment - +1 pending Jenkins.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 17m 0s 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 39s There were no new javac warning messages.
        +1 javadoc 9m 34s There were no new javadoc warning messages.
        +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 20s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 21s mvn install still works.
        +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse.
        +1 findbugs 2m 28s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 native 3m 3s Pre-build of native portion
        -1 hdfs tests 161m 4s Tests failed in hadoop-hdfs.
            204m 29s  



        Reason Tests
        Failed unit tests hadoop.hdfs.server.namenode.ha.TestStandbyIsHot



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12744747/HDFS-8751.01.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 0824426
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11664/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11664/testReport/
        Java 1.7.0_55
        uname Linux asf909.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/11664/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 17m 0s 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 39s There were no new javac warning messages. +1 javadoc 9m 34s There were no new javadoc warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 20s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 21s mvn install still works. +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse. +1 findbugs 2m 28s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 3m 3s Pre-build of native portion -1 hdfs tests 161m 4s Tests failed in hadoop-hdfs.     204m 29s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.ha.TestStandbyIsHot Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12744747/HDFS-8751.01.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 0824426 hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11664/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11664/testReport/ Java 1.7.0_55 uname Linux asf909.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/11664/console This message was automatically generated.
        Hide
        zhz Zhe Zhang added a comment -

        Thanks Jing for reviewing! testDatanodeRestarts is unrelated to the patch (the only non-formatting change is to replace all setBlocks(null) with clearBlocks(), and it passes locally.

        Show
        zhz Zhe Zhang added a comment - Thanks Jing for reviewing! testDatanodeRestarts is unrelated to the patch (the only non-formatting change is to replace all setBlocks(null) with clearBlocks() , and it passes locally.
        Hide
        jingzhao Jing Zhao added a comment -

        I've committed this to trunk and branch-2. Thanks Zhe for the contribution!

        Show
        jingzhao Jing Zhao added a comment - I've committed this to trunk and branch-2. Thanks Zhe for the contribution!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8149 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8149/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8149 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8149/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #253 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/253/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #253 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/253/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #983 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/983/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #983 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/983/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #251 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/251/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #251 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/251/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2180 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2180/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2180 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2180/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #241 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/241/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #241 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/241/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2199 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2199/)
        HDFS-8751. Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2199 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2199/ ) HDFS-8751 . Remove setBlocks API from INodeFile and misc code cleanup. Contributed by Zhe Zhang (jing9: rev 47f4c54106ebb234a7d3dc71320aa584ecba161a) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirConcatOp.java

          People

          • Assignee:
            zhz Zhe Zhang
            Reporter:
            zhz Zhe Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development