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

removeErasureCodingPolicy needs super user permission

    Details

      Description

      Currently NameNodeRPCServer#removeErasureCodingPolicy does not require super user permission. This is not appropriate as NameNodeRPCServer#addErasureCodingPolicies requires super user permission.

      1. HDFS-12062.001.patch
        0.8 kB
        Wei-Chiu Chuang
      2. HDFS-12062.002.patch
        8 kB
        Wei-Chiu Chuang

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12065 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12065/)
        HDFS-12062. removeErasureCodingPolicy needs super user permission. (weichiu: rev 369f731264d77617452e4074d15404bd62ec6093)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingPolicies.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12065 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12065/ ) HDFS-12062 . removeErasureCodingPolicy needs super user permission. (weichiu: rev 369f731264d77617452e4074d15404bd62ec6093) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingPolicies.java (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Committed rev 002 patch to trunk. Thanks Lei (Eddy) Xu for the review!

        Show
        jojochuang Wei-Chiu Chuang added a comment - Committed rev 002 patch to trunk. Thanks Lei (Eddy) Xu for the review!
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Committing the rev 002 patch shortly (without Eddy's LambdaTestUtils suggestion ... maybe next time?)

        Show
        jojochuang Wei-Chiu Chuang added a comment - Committing the rev 002 patch shortly (without Eddy's LambdaTestUtils suggestion ... maybe next time?)
        Hide
        andrew.wang Andrew Wang added a comment -

        Ping, is this JIRA going in?

        Show
        andrew.wang Andrew Wang added a comment - Ping, is this JIRA going in?
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        +1. It LGTM.

        Would you like to use LambdaTestUtils#intercept() in your test. It'd be a nice JDK 8 improvement. I'd ok with either way.

        Show
        eddyxu Lei (Eddy) Xu added a comment - +1. It LGTM. Would you like to use LambdaTestUtils#intercept() in your test. It'd be a nice JDK 8 improvement. I'd ok with either way.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 15s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 2 new or modified test files.
        0 mvndep 0m 8s Maven dependency ordering for branch
        +1 mvninstall 14m 5s trunk passed
        +1 compile 1m 34s trunk passed
        +1 checkstyle 0m 42s trunk passed
        +1 mvnsite 1m 29s trunk passed
        -1 findbugs 1m 25s hadoop-hdfs-project/hadoop-hdfs-client in trunk has 2 extant Findbugs warnings.
        -1 findbugs 1m 46s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings.
        +1 javadoc 1m 6s trunk passed
        0 mvndep 0m 8s Maven dependency ordering for patch
        +1 mvninstall 1m 41s the patch passed
        +1 compile 1m 43s the patch passed
        +1 javac 1m 43s the patch passed
        -0 checkstyle 0m 45s hadoop-hdfs-project: The patch generated 2 new + 151 unchanged - 0 fixed = 153 total (was 151)
        +1 mvnsite 1m 40s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 3m 48s the patch passed
        +1 javadoc 1m 0s the patch passed
        +1 unit 1m 14s hadoop-hdfs-client in the patch passed.
        -1 unit 71m 46s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 21s The patch does not generate ASF License warnings.
        108m 10s



        Reason Tests
        Failed junit tests hadoop.hdfs.TestDFSStripedOutputStreamWithFailure070
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting
          hadoop.hdfs.TestDFSStripedOutputStreamWithFailure150
        Timed out junit tests org.apache.hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:14b5c93
        JIRA Issue HDFS-12062
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12875117/HDFS-12062.002.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 900aa265c848 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 441378e
        Default Java 1.8.0_131
        findbugs v3.1.0-RC1
        findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-client-warnings.html
        findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20100/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20100/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 2 new or modified test files. 0 mvndep 0m 8s Maven dependency ordering for branch +1 mvninstall 14m 5s trunk passed +1 compile 1m 34s trunk passed +1 checkstyle 0m 42s trunk passed +1 mvnsite 1m 29s trunk passed -1 findbugs 1m 25s hadoop-hdfs-project/hadoop-hdfs-client in trunk has 2 extant Findbugs warnings. -1 findbugs 1m 46s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings. +1 javadoc 1m 6s trunk passed 0 mvndep 0m 8s Maven dependency ordering for patch +1 mvninstall 1m 41s the patch passed +1 compile 1m 43s the patch passed +1 javac 1m 43s the patch passed -0 checkstyle 0m 45s hadoop-hdfs-project: The patch generated 2 new + 151 unchanged - 0 fixed = 153 total (was 151) +1 mvnsite 1m 40s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 3m 48s the patch passed +1 javadoc 1m 0s the patch passed +1 unit 1m 14s hadoop-hdfs-client in the patch passed. -1 unit 71m 46s hadoop-hdfs in the patch failed. +1 asflicense 0m 21s The patch does not generate ASF License warnings. 108m 10s Reason Tests Failed junit tests hadoop.hdfs.TestDFSStripedOutputStreamWithFailure070   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure150 Timed out junit tests org.apache.hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-12062 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12875117/HDFS-12062.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 900aa265c848 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 441378e Default Java 1.8.0_131 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-client-warnings.html findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/20100/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/20100/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project Console output https://builds.apache.org/job/PreCommit-HDFS-Build/20100/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        My bad. Here's the real patch

        Show
        jojochuang Wei-Chiu Chuang added a comment - My bad. Here's the real patch
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Added tests for this EC operation as well as a few others (addErasureCodingPolicies, enableErasureCodingPolicy, disableErasureCodingPolicy)

        Show
        jojochuang Wei-Chiu Chuang added a comment - Added tests for this EC operation as well as a few others (addErasureCodingPolicies, enableErasureCodingPolicy, disableErasureCodingPolicy)
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        LGTM. Could you add a simple test as the spec?

        Thanks for working on this Wei-Chiu Chuang

        Show
        eddyxu Lei (Eddy) Xu added a comment - LGTM. Could you add a simple test as the spec? Thanks for working on this Wei-Chiu Chuang
        Hide
        jojochuang Wei-Chiu Chuang added a comment -

        Attach a simple one-liner fix to add permission check. Lei (Eddy) Xu, mind to take a look?

        Show
        jojochuang Wei-Chiu Chuang added a comment - Attach a simple one-liner fix to add permission check. Lei (Eddy) Xu , mind to take a look?

          People

          • Assignee:
            jojochuang Wei-Chiu Chuang
            Reporter:
            jojochuang Wei-Chiu Chuang
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development