Hadoop Common
  1. Hadoop Common
  2. HADOOP-8789

Tests setLevel(Level.OFF) should be Level.ERROR

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1-alpha
    • Fix Version/s: 2.0.3-alpha, 0.23.5
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Multiple tests have code like

      ((Log4JLogger)LogFactory.getLog(FSNamesystem.class)).getLogger().setLevel(Level.OFF);
      

      Completely disabling logs from given classes with Level.OFF is a bad idea and makes debugging other test failures, especially intermittent test failures like HDFS-3664, difficult. Instead the code should use Level.ERROR to reduce verbosity.

      1. hdfs-3911.txt
        3 kB
        Andy Isaacson

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #392 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/392/)
        svn merge -c 1383494 FIXES: HADOOP-8789. Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1392492)

        Result = UNSTABLE
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1392492
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java
        • /hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
        • /hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #392 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/392/ ) svn merge -c 1383494 FIXES: HADOOP-8789 . Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1392492) Result = UNSTABLE bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1392492 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java /hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java /hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Hide
        Robert Joseph Evans added a comment -

        I pulled this into branch-0.23

        Show
        Robert Joseph Evans added a comment - I pulled this into branch-0.23
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1194 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1194/)
        HADOOP-8789. Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1194 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1194/ ) HADOOP-8789 . Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1163 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1163/)
        HADOOP-8789. Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1163 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1163/ ) HADOOP-8789 . Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2741 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2741/)
        HADOOP-8789. Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2741 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2741/ ) HADOOP-8789 . Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2717 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2717/)
        HADOOP-8789. Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2717 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2717/ ) HADOOP-8789 . Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2780 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2780/)
        HADOOP-8789. Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
        • /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2780 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2780/ ) HADOOP-8789 . Tests setLevel(Level.OFF) should be Level.ERROR. Contributed by Andy Isaacson (Revision 1383494) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383494 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java /hadoop/common/trunk/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestDistCh.java
        Hide
        Eli Collins added a comment -

        I've committed this and merged to branch-2. Thanks Andy.

        Show
        Eli Collins added a comment - I've committed this and merged to branch-2. Thanks Andy.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12544510/hdfs-3911.txt
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-tools/hadoop-archives hadoop-tools/hadoop-extras.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3167//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3167//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12544510/hdfs-3911.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in hadoop-tools/hadoop-archives hadoop-tools/hadoop-extras. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3167//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3167//console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        good call

        +1 pending jenkins

        Show
        Eli Collins added a comment - good call +1 pending jenkins
        Hide
        Andy Isaacson added a comment -

        Attaching patch replacing Level.OFF with Level.ERROR in TestHadoopArchives, TestCopyFiles, TestDistCh.

        Show
        Andy Isaacson added a comment - Attaching patch replacing Level.OFF with Level.ERROR in TestHadoopArchives, TestCopyFiles, TestDistCh.

          People

          • Assignee:
            Andy Isaacson
            Reporter:
            Andy Isaacson
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development