hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11430) Add GenericTestUtils#disableLog, GenericTestUtils#setLogLevel
Date Fri, 19 Dec 2014 10:41:16 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253233#comment-14253233
] 

Hudson commented on HADOOP-11430:
---------------------------------

FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #46 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/46/])
HADOOP-11430. Add GenericTestUtils#disableLog, GenericTestUtils#setLogLevel (cmccabe) (cmccabe:
rev 6635ccd21766faf8f6a15d937dc8919a9075c988)
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java
* hadoop-common-project/hadoop-common/CHANGES.txt
* hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotTestHelper.java
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextCreateMkdirBaseTest.java
* hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
* hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java


> Add GenericTestUtils#disableLog, GenericTestUtils#setLogLevel
> -------------------------------------------------------------
>
>                 Key: HADOOP-11430
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11430
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 2.6.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>             Fix For: 2.7.0
>
>         Attachments: HADOOP-11430.001.patch
>
>
> Now that we are using both commons-logging and slf4j, we can no longer rely on just casting
the Log object to a {{Log4JLogger}} and calling {{setLevel}} on that.  With {{org.slf4j.Logger}}
objects, we need to look up the underlying {{Log4JLogger}} using {{LogManager#getLogger}}.
> This patch adds {{GenericTestUtils#disableLog}} and {{GenericTestUtils#setLogLevel}}
functions which hide this complexity from unit tests, just allowing the tests to call {{disableLog}}
or {{setLogLevel}}, and have {{GenericTestUtils}} figure out the right thing to do based on
the log / logger type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message