Grokbase Groups Hive dev May 2014
FAQ
[ https://issues.apache.org/jira/browse/HIVE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Navis updated HIVE-6923:
------------------------

     Fix Version/s: (was: 0.13.0)
                    0.14.0
Use slf4j For Logging Everywhere
--------------------------------

Key: HIVE-6923
URL: https://issues.apache.org/jira/browse/HIVE-6923
Project: Hive
Issue Type: Improvement
Components: HiveServer2
Reporter: Nick White
Assignee: Nick White
Fix For: 0.14.0

Attachments: HIVE-6923.patch


Hive uses a mixture of slf4j (backed by log4j) and commons-logging. I've attached a patch to tidy this up, by just using slf4j for all loggers. This means that applications using the JDBC driver can make Hive log through their own slf4j implementation consistently.


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

Search Discussions

  • Ashutosh Chauhan (JIRA) at May 24, 2014 at 11:23 pm
    [ https://issues.apache.org/jira/browse/HIVE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Ashutosh Chauhan updated HIVE-6923:
    -----------------------------------

         Status: Open (was: Patch Available)

    I think we should go other way. That is replace slf4j references in Hive codebase with commons-logging so that we have one consistent facade. For one, this should result in much smaller patch, but more importantly most of other components in hadoop ecosystem use commons-logging and its important that we are aligned with hadoop in our choice of facade to make it easier to configure logging.
    Use slf4j For Logging Everywhere
    --------------------------------

    Key: HIVE-6923
    URL: https://issues.apache.org/jira/browse/HIVE-6923
    Project: Hive
    Issue Type: Improvement
    Components: HiveServer2
    Reporter: Nick White
    Assignee: Nick White
    Fix For: 0.14.0

    Attachments: HIVE-6923.patch


    Hive uses a mixture of slf4j (backed by log4j) and commons-logging. I've attached a patch to tidy this up, by just using slf4j for all loggers. This means that applications using the JDBC driver can make Hive log through their own slf4j implementation consistently.


    --
    This message was sent by Atlassian JIRA
    (v6.2#6252)
  • Thejas M Nair (JIRA) at May 26, 2014 at 12:05 pm
    [ https://issues.apache.org/jira/browse/HIVE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008783#comment-14008783 ]

    Thejas M Nair commented on HIVE-6923:
    -------------------------------------

    bq. importantly most of other components in hadoop ecosystem use commons-logging and its important that we are aligned with hadoop

    Hadoop community seems to have formed a consensus around switching to slf4j - http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201404.mbox/%3CCABCYYb9B4d_7maFtgp5zqkOyNW-iMi71DCkkww_e_6VMkXWt5g@mail.gmail.com%3E

    The reasons cited there to use slf4j over commons-logging seems convincing enough -
    {code}
    The best initial thing about SL4FJ is how it only expands its arguments
    string values if needed

           LOG.debug("Initialized, principal [{}] from keytab [{}]", principal,
    keytab);

    not logging at debug? No need to test first. That alone saves code and
    improves readability.

    {code}
    Use slf4j For Logging Everywhere
    --------------------------------

    Key: HIVE-6923
    URL: https://issues.apache.org/jira/browse/HIVE-6923
    Project: Hive
    Issue Type: Improvement
    Components: HiveServer2
    Reporter: Nick White
    Assignee: Nick White
    Fix For: 0.14.0

    Attachments: HIVE-6923.patch


    Hive uses a mixture of slf4j (backed by log4j) and commons-logging. I've attached a patch to tidy this up, by just using slf4j for all loggers. This means that applications using the JDBC driver can make Hive log through their own slf4j implementation consistently.


    --
    This message was sent by Atlassian JIRA
    (v6.2#6252)
  • Thejas M Nair (JIRA) at May 26, 2014 at 12:07 pm
    [ https://issues.apache.org/jira/browse/HIVE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008783#comment-14008783 ]

    Thejas M Nair edited comment on HIVE-6923 at 5/26/14 12:05 PM:
    ---------------------------------------------------------------

    bq. importantly most of other components in hadoop ecosystem use commons-logging and its important that we are aligned with hadoop

    Hadoop community seems to have formed a consensus around switching to slf4j - http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201404.mbox/%3CCABCYYb9B4d_7maFtgp5zqkOyNW-iMi71DCkkww_e_6VMkXWt5g@mail.gmail.com%3E

    The reasons cited there to use slf4j over commons-logging seems convincing enough -
    {code}
    The best initial thing about SL4FJ is how it only expands its arguments
    string values if needed

           LOG.debug("Initialized, principal [{}] from keytab [{}]", principal,
    keytab);

    not logging at debug? No need to test first. That alone saves code and
    improves readability.
    {code}

    But it looks like hadoop is going to be in a mixed slf4j+commons-logging mode for a bit.




    was (Author: thejas):
    bq. importantly most of other components in hadoop ecosystem use commons-logging and its important that we are aligned with hadoop

    Hadoop community seems to have formed a consensus around switching to slf4j - http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201404.mbox/%3CCABCYYb9B4d_7maFtgp5zqkOyNW-iMi71DCkkww_e_6VMkXWt5g@mail.gmail.com%3E

    The reasons cited there to use slf4j over commons-logging seems convincing enough -
    {code}
    The best initial thing about SL4FJ is how it only expands its arguments
    string values if needed

           LOG.debug("Initialized, principal [{}] from keytab [{}]", principal,
    keytab);

    not logging at debug? No need to test first. That alone saves code and
    improves readability.

    {code}
    Use slf4j For Logging Everywhere
    --------------------------------

    Key: HIVE-6923
    URL: https://issues.apache.org/jira/browse/HIVE-6923
    Project: Hive
    Issue Type: Improvement
    Components: HiveServer2
    Reporter: Nick White
    Assignee: Nick White
    Fix For: 0.14.0

    Attachments: HIVE-6923.patch


    Hive uses a mixture of slf4j (backed by log4j) and commons-logging. I've attached a patch to tidy this up, by just using slf4j for all loggers. This means that applications using the JDBC driver can make Hive log through their own slf4j implementation consistently.


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshive, hadoop
postedMay 12, '14 at 8:32a
activeMay 26, '14 at 12:07p
posts4
users1
websitehive.apache.org

1 user in discussion

Thejas M Nair (JIRA): 4 posts

People

Translate

site design / logo © 2022 Grokbase