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

FSNamesystem.initAuditLoggers() doesn't trim classnames

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None

      Description

      The FSNamesystem.initAuditLoggers() method reads a list of audit loggers from a call to {{ conf.getStringCollection(DFS_NAMENODE_AUDIT_LOGGERS_KEY);}}

      What it doesn't do is trim each entry -so if there's a space or newline in the
      list, the classname is invalid and won't load, so HDFS wont come out to play.

      1. HDFS-9708.000.patch
        1 kB
        Mingliang Liu
      2. HDFS-9708.001.patch
        6 kB
        Mingliang Liu

        Activity

        Hide
        liuml07 Mingliang Liu added a comment -

        Will conf.getTrimmedStringCollection(DFS_NAMENODE_AUDIT_LOGGERS_KEY); work for this case?

        Show
        liuml07 Mingliang Liu added a comment - Will conf.getTrimmedStringCollection(DFS_NAMENODE_AUDIT_LOGGERS_KEY); work for this case?
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 7m 48s trunk passed
        +1 compile 0m 39s trunk passed with JDK v1.8.0_66
        +1 compile 0m 41s trunk passed with JDK v1.7.0_91
        +1 checkstyle 0m 22s trunk passed
        +1 mvnsite 0m 52s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 54s trunk passed
        +1 javadoc 1m 9s trunk passed with JDK v1.8.0_66
        +1 javadoc 1m 43s trunk passed with JDK v1.7.0_91
        +1 mvninstall 0m 45s the patch passed
        +1 compile 0m 38s the patch passed with JDK v1.8.0_66
        +1 javac 0m 38s the patch passed
        +1 compile 0m 39s the patch passed with JDK v1.7.0_91
        +1 javac 0m 39s the patch passed
        +1 checkstyle 0m 20s hadoop-hdfs-project/hadoop-hdfs: patch generated 0 new + 186 unchanged - 1 fixed = 186 total (was 187)
        +1 mvnsite 0m 49s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 6s the patch passed
        +1 javadoc 1m 4s the patch passed with JDK v1.8.0_66
        +1 javadoc 1m 45s the patch passed with JDK v1.7.0_91
        -1 unit 54m 49s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
        -1 unit 56m 9s hadoop-hdfs in the patch failed with JDK v1.7.0_91.
        +1 asflicense 0m 31s Patch does not generate ASF License warnings.
        137m 32s



        Reason Tests
        JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation
        JDK v1.7.0_91 Failed junit tests hadoop.hdfs.TestRecoverStripedFile
        JDK v1.7.0_91 Timed out junit tests org.apache.hadoop.hdfs.web.TestWebHdfsTokens



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784524/HDFS-9708.000.patch
        JIRA Issue HDFS-9708
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux b23082337619 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
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / cf8af7b
        Default Java 1.7.0_91
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt
        JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14250/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Max memory used 77MB
        Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14250/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 7m 48s trunk passed +1 compile 0m 39s trunk passed with JDK v1.8.0_66 +1 compile 0m 41s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 22s trunk passed +1 mvnsite 0m 52s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 54s trunk passed +1 javadoc 1m 9s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 43s trunk passed with JDK v1.7.0_91 +1 mvninstall 0m 45s the patch passed +1 compile 0m 38s the patch passed with JDK v1.8.0_66 +1 javac 0m 38s the patch passed +1 compile 0m 39s the patch passed with JDK v1.7.0_91 +1 javac 0m 39s the patch passed +1 checkstyle 0m 20s hadoop-hdfs-project/hadoop-hdfs: patch generated 0 new + 186 unchanged - 1 fixed = 186 total (was 187) +1 mvnsite 0m 49s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 6s the patch passed +1 javadoc 1m 4s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 45s the patch passed with JDK v1.7.0_91 -1 unit 54m 49s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 56m 9s hadoop-hdfs in the patch failed with JDK v1.7.0_91. +1 asflicense 0m 31s Patch does not generate ASF License warnings. 137m 32s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation JDK v1.7.0_91 Failed junit tests hadoop.hdfs.TestRecoverStripedFile JDK v1.7.0_91 Timed out junit tests org.apache.hadoop.hdfs.web.TestWebHdfsTokens Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784524/HDFS-9708.000.patch JIRA Issue HDFS-9708 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux b23082337619 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / cf8af7b Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14250/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14250/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 77MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14250/console This message was automatically generated.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        should do ... though really we should be testing this

        Show
        stevel@apache.org Steve Loughran added a comment - should do ... though really we should be testing this
        Hide
        liuml07 Mingliang Liu added a comment -

        Thanks Steve Loughran for your suggestion. In v0 patch, I find the Configuration#getTrimmedStringCollection() is tested and assume that's covered.

        As there is logic for default and top audit loggers in FSNamesystem, the v1 patch adds unit test for audit loggers initialization.

        Show
        liuml07 Mingliang Liu added a comment - Thanks Steve Loughran for your suggestion. In v0 patch, I find the Configuration#getTrimmedStringCollection() is tested and assume that's covered. As there is logic for default and top audit loggers in FSNamesystem , the v1 patch adds unit test for audit loggers initialization.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 6m 39s trunk passed
        +1 compile 0m 38s trunk passed with JDK v1.8.0_66
        +1 compile 0m 40s trunk passed with JDK v1.7.0_91
        +1 checkstyle 0m 24s trunk passed
        +1 mvnsite 0m 51s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 51s trunk passed
        +1 javadoc 1m 4s trunk passed with JDK v1.8.0_66
        +1 javadoc 1m 46s trunk passed with JDK v1.7.0_91
        +1 mvninstall 0m 44s the patch passed
        +1 compile 0m 35s the patch passed with JDK v1.8.0_66
        +1 javac 0m 35s the patch passed
        +1 compile 0m 37s the patch passed with JDK v1.7.0_91
        +1 javac 0m 37s the patch passed
        +1 checkstyle 0m 19s hadoop-hdfs-project/hadoop-hdfs: patch generated 0 new + 186 unchanged - 1 fixed = 186 total (was 187)
        +1 mvnsite 0m 48s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 5s the patch passed
        +1 javadoc 0m 59s the patch passed with JDK v1.8.0_66
        +1 javadoc 1m 41s the patch passed with JDK v1.7.0_91
        -1 unit 53m 29s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
        -1 unit 50m 33s hadoop-hdfs in the patch failed with JDK v1.7.0_91.
        +1 asflicense 0m 24s Patch does not generate ASF License warnings.
        128m 47s



        Reason Tests
        JDK v1.8.0_66 Failed junit tests hadoop.hdfs.web.TestWebHDFS
        JDK v1.7.0_91 Failed junit tests hadoop.hdfs.TestRecoverStripedFile
          hadoop.fs.viewfs.TestViewFileSystemHdfs



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784738/HDFS-9708.001.patch
        JIRA Issue HDFS-9708
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 341944709c1c 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
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / fb238d7
        Default Java 1.7.0_91
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt
        JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14269/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Max memory used 76MB
        Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14269/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 39s trunk passed +1 compile 0m 38s trunk passed with JDK v1.8.0_66 +1 compile 0m 40s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 24s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 51s trunk passed +1 javadoc 1m 4s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 46s trunk passed with JDK v1.7.0_91 +1 mvninstall 0m 44s the patch passed +1 compile 0m 35s the patch passed with JDK v1.8.0_66 +1 javac 0m 35s the patch passed +1 compile 0m 37s the patch passed with JDK v1.7.0_91 +1 javac 0m 37s the patch passed +1 checkstyle 0m 19s hadoop-hdfs-project/hadoop-hdfs: patch generated 0 new + 186 unchanged - 1 fixed = 186 total (was 187) +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 5s the patch passed +1 javadoc 0m 59s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 41s the patch passed with JDK v1.7.0_91 -1 unit 53m 29s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 50m 33s hadoop-hdfs in the patch failed with JDK v1.7.0_91. +1 asflicense 0m 24s Patch does not generate ASF License warnings. 128m 47s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.web.TestWebHDFS JDK v1.7.0_91 Failed junit tests hadoop.hdfs.TestRecoverStripedFile   hadoop.fs.viewfs.TestViewFileSystemHdfs Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784738/HDFS-9708.001.patch JIRA Issue HDFS-9708 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 341944709c1c 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 Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / fb238d7 Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14269/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14269/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 76MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14269/console This message was automatically generated.
        Hide
        liuml07 Mingliang Liu added a comment -

        hadoop.hdfs.TestRecoverStripedFile is flaky and tracked by HDFS-9716, hadoop.hdfs.web.TestWebHDFS by HDFS-6183, org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs.testGetBlockLocations can not reproduce locally, and seems unrelated.

        Show
        liuml07 Mingliang Liu added a comment - hadoop.hdfs.TestRecoverStripedFile is flaky and tracked by HDFS-9716 , hadoop.hdfs.web.TestWebHDFS by HDFS-6183 , org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs.testGetBlockLocations can not reproduce locally, and seems unrelated.
        Hide
        liuml07 Mingliang Liu added a comment -

        Hi, Steve Loughran, does the newly added unit tests make sense? Thanks.

        Show
        liuml07 Mingliang Liu added a comment - Hi, Steve Loughran , does the newly added unit tests make sense? Thanks.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        +1, commited, thanks!

        Show
        stevel@apache.org Steve Loughran added a comment - +1, commited, thanks!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9215 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9215/)
        HDFS-9708. FSNamesystem.initAuditLoggers() doesn't trim classnames (stevel: rev af2dccbca50b25f84d9d6c88e1a237a42261ce02)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9215 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9215/ ) HDFS-9708 . FSNamesystem.initAuditLoggers() doesn't trim classnames (stevel: rev af2dccbca50b25f84d9d6c88e1a237a42261ce02) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        liuml07 Mingliang Liu added a comment -

        Thanks for the review and commit! We can resolve this issue ?

        Show
        liuml07 Mingliang Liu added a comment - Thanks for the review and commit! We can resolve this issue ?
        Hide
        stevel@apache.org Steve Loughran added a comment -

        yes, we can resolve it —I forgot about that little detail.

        Show
        stevel@apache.org Steve Loughran added a comment - yes, we can resolve it —I forgot about that little detail.

          People

          • Assignee:
            liuml07 Mingliang Liu
            Reporter:
            stevel@apache.org Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.25h
              0.25h
              Remaining:
              Remaining Estimate - 0.25h
              0.25h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development