hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11677) Make Logger instance modifiers consistent
Date Fri, 05 Dec 2014 15:26:13 GMT

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

Sean Busbey commented on HBASE-11677:
-------------------------------------

Hi [~Usha710], thanks for working on this.

The test reported by the QA bot fails for me locally once this patch is applied, and doesn't
fail prior to it. Can you take a look at fixing that? To run just that test you can use

{code}
$> mvn -Dtest=TestDelayedRpc clean package
{code}

Please also wrap the two lines that end up over 100 columns.

For Log objects that are shared with test code, please make a new Log reference in the test
class and restrict the access of the non-test Log to private.

When you have things changed, leave the current patch in place and upload an additional one
named "HBASE-11677.2.patch"

For Logs that end up shared amongst non-test classes, what are people's thoughts? Worth the
trouble to transition to independent loggers? Just change without deprecation? Only do that
in 1.0+? Double log to the current logger and the eventual logger with a note in release notes
that the former is going away?

> Make Logger instance modifiers consistent
> -----------------------------------------
>
>                 Key: HBASE-11677
>                 URL: https://issues.apache.org/jira/browse/HBASE-11677
>             Project: HBase
>          Issue Type: Task
>            Reporter: Sean Busbey
>            Priority: Minor
>              Labels: beginner, sonar
>         Attachments: HBASE-11677.patch
>
>
> We have some instances of Logger that are missing one of being private, static, and final.
> ex from HealthChecker.java, missing final
> {code}
>     private static Log LOG = LogFactory.getLog(HealthChecker.class);
> {code}
> * Clean up where possible by making {{private static final}}
> * If we can't, add a non-javadoc note about why
> One way to look for problematic instances is to grep for initial assignment for the commonly
used LOG member, e.g.
> * missing final: {{grep -r "LOG =" * | grep -v "final"}}
> * missing static: {{grep -r "LOG =" * | grep -v "static"}}
> * missing private: {{grep -r "LOG =" * | grep -v "private"}}



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

Mime
View raw message