[ 
https://issues.apache.org/jira/browse/HDFS-8314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526058#comment-14526058
 ] 

Haohui Mai commented on HDFS-8314:
----------------------------------

{code}
+  public static int getIoFileBufferSize() {
+    return new HdfsConfiguration().getInt(
{code}

Creating a new {{HdfsConfiguration}} instance requires parsing the XML 
configuration each time. Maybe it is better to pass it as an argument.

> Move HdfsServerConstants#IO_FILE_BUFFER_SIZE and SMALL_BUFFER_SIZE to the 
> users
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-8314
>                 URL: https://issues.apache.org/jira/browse/HDFS-8314
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: build
>            Reporter: Haohui Mai
>            Assignee: Li Lu
>         Attachments: HDFS-8314-trunk.001.patch
>
>
> Currently HdfsServerConstants reads the configuration and to set the value of 
> IO_FILE_BUFFER_SIZE and SMALL_BUFFER_SIZE, thus they are configurable instead 
> of being constants.
> This jira proposes to move these two variables to the users in the 
> upper-level so that HdfsServerConstants only stores constant values.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to