[ https://issues.apache.org/jira/browse/HDFS-9883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15478888#comment-15478888 ]
Yiqun Lin commented on HDFS-9883: --------------------------------- {quote} For some of these replacements, they are only used in one place anyway; {quote} Agreed, [~andrew.wang]. Feel free to close this JIRA if you have no other suggestions for this. > Change 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: Yiqun Lin > Assignee: Yiqun Lin > 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) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org