hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8314) Move HdfsServerConstants#IO_FILE_BUFFER_SIZE and SMALL_BUFFER_SIZE to the users
Date Tue, 05 May 2015 03:08:06 GMT

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

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

Thanks for working on this.

in hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java:
{code}
+  private static final int SMALL_BUFFER_SIZE;
+  static {
+    HdfsConfiguration conf = new HdfsConfiguration();
+    SMALL_BUFFER_SIZE = DFSUtil.getSmallBufferSize(conf);
+  }
+
{code}

The configuration is available through {{dfsClient.getConfiguration()}}.

in hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java:

{code}
+  private final static HdfsConfiguration HDFS_CONF = new HdfsConfiguration();
+  private final static int IO_FILE_BUFFER_SIZE;
+  private final static int SMALL_BUFFER_SIZE;
+  static {
+    HdfsConfiguration hdfsConf = new HdfsConfiguration();
+    IO_FILE_BUFFER_SIZE = DFSUtil.getIoFileBufferSize(hdfsConf);
+    SMALL_BUFFER_SIZE = DFSUtil.getSmallBufferSize(hdfsConf);
+  }
+
{code}

The configuration is available through {{datanode.getConf()}}. So as hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java.



> 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, HDFS-8314-trunk.002.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)

Mime
View raw message