Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 40E3018A21 for ; Sun, 6 Sep 2015 22:20:51 +0000 (UTC) Received: (qmail 1314 invoked by uid 500); 6 Sep 2015 22:20:46 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 1263 invoked by uid 500); 6 Sep 2015 22:20:45 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 1252 invoked by uid 99); 6 Sep 2015 22:20:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Sep 2015 22:20:45 +0000 Date: Sun, 6 Sep 2015 22:20:45 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-12350) WASB Logging: Improve WASB Logging around deletes, reads and writes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)