Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 35680183CF for ; Wed, 30 Sep 2015 00:11:09 +0000 (UTC) Received: (qmail 1466 invoked by uid 500); 30 Sep 2015 00:11:06 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 1411 invoked by uid 500); 30 Sep 2015 00:11:06 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 1397 invoked by uid 99); 30 Sep 2015 00:11:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2015 00:11:05 +0000 Date: Wed, 30 Sep 2015 00:11:05 +0000 (UTC) From: "Haohui Mai (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8971) Remove guards when calling LOG.debug() and LOG.trace() in client package 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/HDFS-8971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14936131#comment-14936131 ] Haohui Mai commented on HDFS-8971: ---------------------------------- +1. Will commit shortly. > Remove guards when calling LOG.debug() and LOG.trace() in client package > ------------------------------------------------------------------------ > > Key: HDFS-8971 > URL: https://issues.apache.org/jira/browse/HDFS-8971 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: build > Reporter: Mingliang Liu > Assignee: Mingliang Liu > Attachments: HDFS-8971.000.patch, HDFS-8971.001.patch > > > We moved the {{shortcircuit}} package from {{hadoop-hdfs}} to {{hadoop-hdfs-client}} module in JIRA [HDFS-8934|https://issues.apache.org/jira/browse/HDFS-8934] and [HDFS-8951|https://issues.apache.org/jira/browse/HDFS-8951], and {{BlockReader}} in [HDFS-8925|https://issues.apache.org/jira/browse/HDFS-8925]. Meanwhile, we also replaced the _log4j_ log with _slf4j_ logger. There were existing code in the client package to guard the log when calling {{LOG.debug()}} and {{LOG.trace()}}, e.g. in {{ShortCircuitCache.java}}, we have code like this: > {code:title=Trace with guards|borderStyle=solid} > 724 if (LOG.isTraceEnabled()) { > 725 LOG.trace(this + ": found waitable for " + key); > 726 } > {code} > In _slf4j_, this kind of guard is not necessary. We should clean the code by removing the guard from the client package. > {code:title=Trace without guards|borderStyle=solid} > 724 LOG.trace("{}: found waitable for {}", this, key); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)