Hadoop Common
  1. Hadoop Common
  2. HADOOP-7434

Display error when using "daemonlog -setlevel" with illegal level

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      While using the command with inexistent "level" like "nomsg", there is no error message displayed,and the level "DEBUG" is set by default.

      1. HADOOP-7434.patch
        1.0 kB
        XieXianshan
      2. HADOOP-7434
        1 kB
        XieXianshan

        Activity

        Hide
        XieXianshan added a comment -

        Fixed this issue.
        The error msg will be displayed as follow while the command with illegal level.

        Submitted Level: ERRORLEVEL
        Bad level "ERRORLEVEL"

        Show
        XieXianshan added a comment - Fixed this issue. The error msg will be displayed as follow while the command with illegal level. Submitted Level: ERRORLEVEL Bad level "ERRORLEVEL"
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12484712/HADOOP-7434
        against trunk revision 1140442.

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

        -1 tests included. 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 javadoc. The javadoc tool did not generate any warning messages.

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

        +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 core unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/687//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/687//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/687//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/12484712/HADOOP-7434 against trunk revision 1140442. +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 core unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/687//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/687//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/687//console This message is automatically generated.
        Hide
        Todd Lipcon added a comment -

        This patch moves the "Effective level" printout inside the if statement. Isn't it meant that, if level is null, it should just print the current effective level without making a change?

        Show
        Todd Lipcon added a comment - This patch moves the "Effective level" printout inside the if statement. Isn't it meant that, if level is null , it should just print the current effective level without making a change?
        Hide
        XieXianshan added a comment -

        I reuploaded the patch file and moved the "Effective level" out of the if-statement.
        Thanks Todd for the comment.

        Show
        XieXianshan added a comment - I reuploaded the patch file and moved the "Effective level" out of the if-statement. Thanks Todd for the comment.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12486789/HADOOP-7434.patch
        against trunk revision 1147317.

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

        -1 tests included. 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 javadoc. The javadoc tool did not generate any warning messages.

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

        +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 core unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/740//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/740//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/740//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/12486789/HADOOP-7434.patch against trunk revision 1147317. +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 core unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/740//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/740//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/740//console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        +1 latest patch looks good

        Show
        Eli Collins added a comment - +1 latest patch looks good
        Hide
        Eli Collins added a comment -

        I've committed this. Thanks Yan Jin Shuang!

        Show
        Eli Collins added a comment - I've committed this. Thanks Yan Jin Shuang!
        Hide
        Eli Collins added a comment -

        Btw, the rationale for the fix is that loj4j's toLevel returns DEBUG if given an invalid string, so to check for an invalid string you check if the given level matches the string value after conversion.

        Show
        Eli Collins added a comment - Btw, the rationale for the fix is that loj4j's toLevel returns DEBUG if given an invalid string, so to check for an invalid string you check if the given level matches the string value after conversion.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #693 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/693/)
        HADOOP-7434. Display error when using "daemonlog -setlevel" with illegal level. Contributed by yanjinshuang

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

        • /hadoop/common/trunk/common/CHANGES.txt
        • /hadoop/common/trunk/common/src/java/org/apache/hadoop/log/LogLevel.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #693 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/693/ ) HADOOP-7434 . Display error when using "daemonlog -setlevel" with illegal level. Contributed by yanjinshuang eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1147966 Files : /hadoop/common/trunk/common/CHANGES.txt /hadoop/common/trunk/common/src/java/org/apache/hadoop/log/LogLevel.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #751 (See https://builds.apache.org/job/Hadoop-Common-trunk/751/)
        HADOOP-7434. Display error when using "daemonlog -setlevel" with illegal level. Contributed by yanjinshuang

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

        • /hadoop/common/trunk/common/CHANGES.txt
        • /hadoop/common/trunk/common/src/java/org/apache/hadoop/log/LogLevel.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #751 (See https://builds.apache.org/job/Hadoop-Common-trunk/751/ ) HADOOP-7434 . Display error when using "daemonlog -setlevel" with illegal level. Contributed by yanjinshuang eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1147966 Files : /hadoop/common/trunk/common/CHANGES.txt /hadoop/common/trunk/common/src/java/org/apache/hadoop/log/LogLevel.java

          People

          • Assignee:
            严金双
            Reporter:
            严金双
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development