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 9FB2B18996 for ; Wed, 2 Mar 2016 08:01:18 +0000 (UTC) Received: (qmail 82084 invoked by uid 500); 2 Mar 2016 08:01:18 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 82015 invoked by uid 500); 2 Mar 2016 08:01:18 -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 81993 invoked by uid 99); 2 Mar 2016 08:01:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 08:01:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1ACDC2C1F56 for ; Wed, 2 Mar 2016 08:01:18 +0000 (UTC) Date: Wed, 2 Mar 2016 08:01:18 +0000 (UTC) From: "Lin Yiqun (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-9883) Replace the hard-code value to variable 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-9883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lin Yiqun updated HDFS-9883: ---------------------------- Attachment: HDFS-9883.002.patch Fixing the checkstyle issues and adding other hard-code palces, attach the latest patch. > Replace the hard-code value to variable > --------------------------------------- > > Key: HDFS-9883 > URL: https://issues.apache.org/jira/browse/HDFS-9883 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 2.7.1 > Reporter: Lin Yiqun > Assignee: Lin Yiqun > Priority: Minor > Attachments: HDFS-9883.001.patch, HDFS-9883.002.patch > > > In some class of HDFS, there are many hard-code value places. Like this: > {code} > /** Constructor > * @param bandwidthPerSec bandwidth allowed in bytes per second. > */ > public DataTransferThrottler(long bandwidthPerSec) { > this(500, bandwidthPerSec); // by default throttling period is 500ms > } > {code} > It will be better replace these value to variables so that it will not be easily ignored. -- This message was sent by Atlassian JIRA (v6.3.4#6332)