hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12350) WASB Logging: Improve WASB Logging around deletes, reads and writes
Date Sun, 06 Sep 2015 22:20:45 GMT

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

Chris Nauroth commented on HADOOP-12350:
----------------------------------------

Hello [~dchickabasapa].  Thank you for the patch.

I think this is a good opportunity to convert this class to use slf4j.  If you grep for slf4j
throughout the Hadoop source, you'll be able to find existing examples that use it.  Doing
the conversion should just be a matter of removing the Commons Logging imports, adding the
slf4j imports, and then making a small change to the {{LOG}} initialization to call slf4j's
{{LoggerFactory#getLogger}}.

After that, the logic of this patch can be simplified by relying on slf4j's improved API.
 For example, this code...
{code}
      if (LOG.isDebugEnabled()) {
        LOG.error("Encountered Storage Exception for delete on Blob : "
        + blob.getUri() + " Exception Details : " + e.getMessage() +
        " Error Code : " + e.getErrorCode());
      }
{code}
...can be simplified to this...
{code}
      LOG.debug("Encountered Storage Exception for delete on Blob : {} "
          + "Exception Details : {} Error Code : {}", blob.getUri(),
          e.getMessage(), e.getErrorCode());
{code}
There won't be a need for the {{isDebugEnabled}} checks.  Also, notice how the original code
sample from the patch checked for debug level, but then logged at error level.  The slf4j
API helps eliminate that class of bugs.

For the change in {{AzureNativeFileSystemStore}}, there is a debug-level logging statement
in the same method that logs exceptions being swallowed during retries.  Should this new log
statement only apply when it's a fatal exception that can't be retried again?

> WASB Logging: Improve WASB Logging around deletes, reads and writes
> -------------------------------------------------------------------
>
>                 Key: HADOOP-12350
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12350
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: tools
>            Reporter: Dushyanth
>            Assignee: Dushyanth
>             Fix For: 2.8.0
>
>         Attachments: 0001-HADOOP-12350-Added-WASB-Logging-Statement.patch
>
>
> Logging around the WASB component is very limited and it is disabled by default. This
improvement is created to add logging around Reads, Writes and Deletes when Azure Storage
Exception to capture the blobs that hit the exception. This information is useful while communicating
with the Azure storage team for debugging purposes.



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

Mime
View raw message