hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10842) Some loggers not declared static final
Date Thu, 27 Mar 2014 04:05:17 GMT

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

Hudson commented on HBASE-10842:
--------------------------------

SUCCESS: Integrated in HBase-TRUNK #5043 (See [https://builds.apache.org/job/HBase-TRUNK/5043/])
HBASE-10842 Some loggers not declared static final (Richard Ding) (enis: rev 1582142)
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/HRegionPartitioner.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableInputFormatBase.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/OfflineCallback.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSizeCalculator.java


> Some loggers not declared static final
> --------------------------------------
>
>                 Key: HBASE-10842
>                 URL: https://issues.apache.org/jira/browse/HBASE-10842
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.98.1, 0.96.1.1
>            Reporter: Richard Ding
>            Assignee: Richard Ding
>            Priority: Minor
>             Fix For: 0.99.0
>
>         Attachments: HBASE-10842.patch, HBASE-10842.patch
>
>
> In a few of source files, the logger is defined as 
> {code}
> private final Log LOG = LogFactory.getLog(MyClass.class);
> {code}
> This should be changed to static final.
> One question is about the following declaration:
> {code}
> private final Log LOG = LogFactory.getLog(this.getClass());
> {code}
> In this form, the logger can be shared by derived classes. But one will get NPE when
logging in methods that are invoked inside the constructors.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message