Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13323

Downgrade stack trace on FS load from Warn to debug

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      HADOOP-12636 catches exceptions on FS creation, but prints a stack trace @ warn every time..this is noisy and irrelevant if the installation doesn't need connectivity to a specific filesystem or object store.

      I propose: only printing the toString values of the exception chain @ warn; the full stack comes out at debug.

      We could some more tuning:

      • have a specific log for this exception, which allows installations to turn even the warnings off.
      • add a link to a wiki page listing the dependencies of the shipped filesystems

        Issue Links

          Activity

          Hide
          stevel@apache.org Steve Loughran added a comment -

          Patch 001

          logs at WARN all the exception messages, but only does the stack trace at DEBUG.

          test cleaned up slightly, but the new code doesn't actually get directly checked.

          Show
          stevel@apache.org Steve Loughran added a comment - Patch 001 logs at WARN all the exception messages, but only does the stack trace at DEBUG. test cleaned up slightly, but the new code doesn't actually get directly checked.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 14m 21s 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 8m 0s branch-2 passed
          +1 compile 7m 13s branch-2 passed with JDK v1.8.0_91
          +1 compile 7m 42s branch-2 passed with JDK v1.7.0_101
          +1 checkstyle 0m 28s branch-2 passed
          +1 mvnsite 1m 7s branch-2 passed
          +1 mvneclipse 0m 15s branch-2 passed
          +1 findbugs 1m 53s branch-2 passed
          +1 javadoc 0m 52s branch-2 passed with JDK v1.8.0_91
          +1 javadoc 1m 0s branch-2 passed with JDK v1.7.0_101
          +1 mvninstall 0m 48s the patch passed
          +1 compile 7m 26s the patch passed with JDK v1.8.0_91
          +1 javac 7m 26s the patch passed
          +1 compile 7m 37s the patch passed with JDK v1.7.0_101
          +1 javac 7m 37s the patch passed
          +1 checkstyle 0m 30s the patch passed
          +1 mvnsite 1m 8s the patch passed
          +1 mvneclipse 0m 22s the patch passed
          -1 whitespace 0m 0s The patch has 49 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 findbugs 2m 9s the patch passed
          +1 javadoc 0m 52s the patch passed with JDK v1.8.0_91
          +1 javadoc 1m 7s the patch passed with JDK v1.7.0_101
          -1 unit 8m 12s hadoop-common in the patch failed with JDK v1.7.0_101.
          +1 asflicense 0m 22s The patch does not generate ASF License warnings.
          85m 29s



          Reason Tests
          JDK v1.7.0_101 Failed junit tests hadoop.metrics2.impl.TestGangliaMetrics



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:b59b8b7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12813666/HADOOP-13323-branch-2-001.patch
          JIRA Issue HADOOP-13323
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 7f8fb8920404 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 branch-2 / 20ee619
          Default Java 1.7.0_101
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_91 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_101
          findbugs v3.0.0
          whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/artifact/patchprocess/whitespace-eol.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_101.txt
          JDK v1.7.0_101 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/console
          Powered by Apache Yetus 0.4.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 14m 21s 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 8m 0s branch-2 passed +1 compile 7m 13s branch-2 passed with JDK v1.8.0_91 +1 compile 7m 42s branch-2 passed with JDK v1.7.0_101 +1 checkstyle 0m 28s branch-2 passed +1 mvnsite 1m 7s branch-2 passed +1 mvneclipse 0m 15s branch-2 passed +1 findbugs 1m 53s branch-2 passed +1 javadoc 0m 52s branch-2 passed with JDK v1.8.0_91 +1 javadoc 1m 0s branch-2 passed with JDK v1.7.0_101 +1 mvninstall 0m 48s the patch passed +1 compile 7m 26s the patch passed with JDK v1.8.0_91 +1 javac 7m 26s the patch passed +1 compile 7m 37s the patch passed with JDK v1.7.0_101 +1 javac 7m 37s the patch passed +1 checkstyle 0m 30s the patch passed +1 mvnsite 1m 8s the patch passed +1 mvneclipse 0m 22s the patch passed -1 whitespace 0m 0s The patch has 49 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 findbugs 2m 9s the patch passed +1 javadoc 0m 52s the patch passed with JDK v1.8.0_91 +1 javadoc 1m 7s the patch passed with JDK v1.7.0_101 -1 unit 8m 12s hadoop-common in the patch failed with JDK v1.7.0_101. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 85m 29s Reason Tests JDK v1.7.0_101 Failed junit tests hadoop.metrics2.impl.TestGangliaMetrics Subsystem Report/Notes Docker Image:yetus/hadoop:b59b8b7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12813666/HADOOP-13323-branch-2-001.patch JIRA Issue HADOOP-13323 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7f8fb8920404 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 branch-2 / 20ee619 Default Java 1.7.0_101 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_91 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_101 findbugs v3.0.0 whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/artifact/patchprocess/whitespace-eol.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_101.txt JDK v1.7.0_101 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/9880/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          test failure is unrelated

          Show
          stevel@apache.org Steve Loughran added a comment - test failure is unrelated
          Hide
          vagarychen Chen Liang added a comment - - edited

          Hi Steve Loughran,

          I'm trying to dig into the failed test as you mentioned in HADOOP-12588. But the test results report seems to be lost, could you elaborate a bit more on the failed test? Thanks.

          Show
          vagarychen Chen Liang added a comment - - edited Hi Steve Loughran , I'm trying to dig into the failed test as you mentioned in HADOOP-12588 . But the test results report seems to be lost, could you elaborate a bit more on the failed test? Thanks.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          sorry, no details: we'll have to wait for it to surface on jenkins again.

          Show
          stevel@apache.org Steve Loughran added a comment - sorry, no details: we'll have to wait for it to surface on jenkins again.
          Hide
          vagarychen Chen Liang added a comment -

          Thanks for the reply Steve Loughran ! Actually never mind, I was working on HADOOP-13439 which tries to fix that test and I figured it out later on.

          Show
          vagarychen Chen Liang added a comment - Thanks for the reply Steve Loughran ! Actually never mind, I was working on HADOOP-13439 which tries to fix that test and I figured it out later on.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          There's also one other thing to consider: could we somehow isolate things so that we'd know the schema of a failing FS, even before instantiating teh class. I doubt we could do it with an FS, but I could imagine having a different service of a FS declaration class, which would be much simpler

          class FsDeclaration {
           String getSchema()
           String getFileSystemClassName()
           String getFileContextClassName()
          }
          

          it'd only give the names of the classes, so not needing any transitive classloader problems. Any issues with loading a class become postponed until needed, at which point they fail with a meaningful error, rather than just "unknown schema"

          Show
          stevel@apache.org Steve Loughran added a comment - There's also one other thing to consider: could we somehow isolate things so that we'd know the schema of a failing FS, even before instantiating teh class. I doubt we could do it with an FS, but I could imagine having a different service of a FS declaration class, which would be much simpler class FsDeclaration { String getSchema() String getFileSystemClassName() String getFileContextClassName() } it'd only give the names of the classes, so not needing any transitive classloader problems. Any issues with loading a class become postponed until needed, at which point they fail with a meaningful error, rather than just "unknown schema"
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 18s 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 31s branch-2 passed
          +1 compile 5m 31s branch-2 passed with JDK v1.8.0_101
          +1 compile 6m 31s branch-2 passed with JDK v1.7.0_111
          +1 checkstyle 0m 27s branch-2 passed
          +1 mvnsite 0m 57s branch-2 passed
          +1 mvneclipse 0m 15s branch-2 passed
          +1 findbugs 1m 39s branch-2 passed
          +1 javadoc 0m 45s branch-2 passed with JDK v1.8.0_101
          +1 javadoc 0m 57s branch-2 passed with JDK v1.7.0_111
          +1 mvninstall 0m 42s the patch passed
          +1 compile 5m 24s the patch passed with JDK v1.8.0_101
          +1 javac 5m 24s the patch passed
          +1 compile 6m 31s the patch passed with JDK v1.7.0_111
          +1 javac 6m 31s the patch passed
          +1 checkstyle 0m 27s the patch passed
          +1 mvnsite 0m 57s the patch passed
          +1 mvneclipse 0m 16s the patch passed
          -1 whitespace 0m 0s The patch has 47 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
          +1 findbugs 1m 54s the patch passed
          +1 javadoc 0m 46s the patch passed with JDK v1.8.0_101
          +1 javadoc 0m 58s the patch passed with JDK v1.7.0_111
          +1 unit 8m 56s hadoop-common in the patch passed with JDK v1.7.0_111.
          +1 asflicense 0m 22s The patch does not generate ASF License warnings.
          61m 21s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:b59b8b7
          JIRA Issue HADOOP-13323
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12813666/HADOOP-13323-branch-2-001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 682c4b5cced4 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 branch-2 / 69c1ab4
          Default Java 1.7.0_111
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111
          findbugs v3.0.0
          whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/10693/artifact/patchprocess/whitespace-eol.txt
          JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10693/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10693/console
          Powered by Apache Yetus 0.4.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 18s 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 31s branch-2 passed +1 compile 5m 31s branch-2 passed with JDK v1.8.0_101 +1 compile 6m 31s branch-2 passed with JDK v1.7.0_111 +1 checkstyle 0m 27s branch-2 passed +1 mvnsite 0m 57s branch-2 passed +1 mvneclipse 0m 15s branch-2 passed +1 findbugs 1m 39s branch-2 passed +1 javadoc 0m 45s branch-2 passed with JDK v1.8.0_101 +1 javadoc 0m 57s branch-2 passed with JDK v1.7.0_111 +1 mvninstall 0m 42s the patch passed +1 compile 5m 24s the patch passed with JDK v1.8.0_101 +1 javac 5m 24s the patch passed +1 compile 6m 31s the patch passed with JDK v1.7.0_111 +1 javac 6m 31s the patch passed +1 checkstyle 0m 27s the patch passed +1 mvnsite 0m 57s the patch passed +1 mvneclipse 0m 16s the patch passed -1 whitespace 0m 0s The patch has 47 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply +1 findbugs 1m 54s the patch passed +1 javadoc 0m 46s the patch passed with JDK v1.8.0_101 +1 javadoc 0m 58s the patch passed with JDK v1.7.0_111 +1 unit 8m 56s hadoop-common in the patch passed with JDK v1.7.0_111. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 61m 21s Subsystem Report/Notes Docker Image:yetus/hadoop:b59b8b7 JIRA Issue HADOOP-13323 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12813666/HADOOP-13323-branch-2-001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 682c4b5cced4 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 branch-2 / 69c1ab4 Default Java 1.7.0_111 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111 findbugs v3.0.0 whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/10693/artifact/patchprocess/whitespace-eol.txt JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10693/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10693/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          cnauroth Chris Nauroth added a comment -

          I really like this idea as something that could be included in the scope of HADOOP-11527 (Support ServiceLoader mechanism for finding subclasses of AbstractFileSystem). I'll paste the information over there.

          Show
          cnauroth Chris Nauroth added a comment - I really like this idea as something that could be included in the scope of HADOOP-11527 (Support ServiceLoader mechanism for finding subclasses of AbstractFileSystem). I'll paste the information over there.
          Hide
          cnauroth Chris Nauroth added a comment -

          +1 for the patch. In addition to the unit test, I did some manual testing by hacking up a deployment of the distro with a mangled classpath. The patch worked as advertised, with the messages at warn level and the full stack trace appearing after I switched on debug logging. I committed this to trunk, branch-2 and branch-2.8. Steve, thank you.

          Show
          cnauroth Chris Nauroth added a comment - +1 for the patch. In addition to the unit test, I did some manual testing by hacking up a deployment of the distro with a mangled classpath. The patch worked as advertised, with the messages at warn level and the full stack trace appearing after I switched on debug logging. I committed this to trunk, branch-2 and branch-2.8. Steve, thank you.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10558 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10558/)
          HADOOP-13323. Downgrade stack trace on FS load from Warn to debug. (cnauroth: rev 2d46c3f6b7d55b6a2f124d07fe26d37359615df4)

          • (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemInitialization.java
          • (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10558 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10558/ ) HADOOP-13323 . Downgrade stack trace on FS load from Warn to debug. (cnauroth: rev 2d46c3f6b7d55b6a2f124d07fe26d37359615df4) (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemInitialization.java (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Hide
          andrew.wang Andrew Wang added a comment -

          Reminder, please set a 3.x fix version when committing to trunk. Thanks!

          Show
          andrew.wang Andrew Wang added a comment - Reminder, please set a 3.x fix version when committing to trunk. Thanks!

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development