Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 10DFF200B5C for ; Thu, 11 Aug 2016 16:15:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0FC4F160A93; Thu, 11 Aug 2016 14:15:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 84599160A90 for ; Thu, 11 Aug 2016 16:15:22 +0200 (CEST) Received: (qmail 83476 invoked by uid 500); 11 Aug 2016 14:15:21 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 83446 invoked by uid 99); 11 Aug 2016 14:15:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2016 14:15:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D0C352C02A3 for ; Thu, 11 Aug 2016 14:15:20 +0000 (UTC) Date: Thu, 11 Aug 2016 14:15:20 +0000 (UTC) From: "Nemo Chen (JIRA)" To: common-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HADOOP-13484) Log refactoring: method invocation should be replaced by variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 11 Aug 2016 14:15:23 -0000 Nemo Chen created HADOOP-13484: ---------------------------------- Summary: Log refactoring: method invocation should be replaced by variable Key: HADOOP-13484 URL: https://issues.apache.org/jira/browse/HADOOP-13484 Project: Hadoop Common Issue Type: Bug Components: metrics Affects Versions: 2.7.2 Reporter: Nemo Chen Similar to the fix for HDFS-409. In file: hadoop-rel-release-2.7.2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableRates.java In code block: {code:borderStyle=solid} String name = method.getName(); LOG.debug(name); try { registry.newRate(name, name, false, true); } catch (Exception e) { LOG.error("Error creating rate metrics for "+ method.getName(), e); } {code} method.getName() is better to be replaced by variable name. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-dev-help@hadoop.apache.org