You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2019/02/18 14:54:00 UTC
[jira] [Updated] (HDFS-14294) Deprecate
DFSUtilClient#getSmallBufferSize
[ https://issues.apache.org/jira/browse/HDFS-14294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
BELUGA BEHR updated HDFS-14294:
-------------------------------
Description:
{code:java|title=DFSUtilClient.java}
public static int getIoFileBufferSize(Configuration conf) {
return conf.getInt(
CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_KEY,
CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_DEFAULT);
}
public static int getSmallBufferSize(Configuration conf) {
return Math.min(getIoFileBufferSize(conf) / 2, 512);
}
{code}
This concept of a "small buffer size" seems a bit overkill. First of all, it's not documented that such a thing exists and that by adjusting {{dfs.stream-buffer-size}} an administrator is also scaling these other buffer sizes. Seconds, I think any "small" buffer size should just use the default JDK buffer sizes. Anything that benefits from being larger than the default JDK size should be the controlled by {{IO_FILE_BUFFER_SIZE_KEY}} / {{dfs.stream-buffer-size}}. For reference, the default JDK size is 8K : [HDFS-14293]
was:
{code:java|title=DFSUtilClient.java}
public static int getIoFileBufferSize(Configuration conf) {
return conf.getInt(
CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_KEY,
CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_DEFAULT);
}
public static int getSmallBufferSize(Configuration conf) {
return Math.min(getIoFileBufferSize(conf) / 2, 512);
}
{code}
This concept of a "small buffer size" seems a bit overkill. First of all, it's not documented that such a thing exists and that by adjusting {{dfs.stream-buffer-size}} an administrator is also scaling these other buffer sizes. Seconds, I think any "small" buffer size should just use the default JDK buffer sizes. Anything that benefits from being larger than the default JDK size should be the controlled by {{IO_FILE_BUFFER_SIZE_KEY}} / {{dfs.stream-buffer-size}}
> Deprecate DFSUtilClient#getSmallBufferSize
> ------------------------------------------
>
> Key: HDFS-14294
> URL: https://issues.apache.org/jira/browse/HDFS-14294
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs
> Affects Versions: 3.2.0
> Reporter: BELUGA BEHR
> Priority: Minor
>
> {code:java|title=DFSUtilClient.java}
> public static int getIoFileBufferSize(Configuration conf) {
> return conf.getInt(
> CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_KEY,
> CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_DEFAULT);
> }
> public static int getSmallBufferSize(Configuration conf) {
> return Math.min(getIoFileBufferSize(conf) / 2, 512);
> }
> {code}
> This concept of a "small buffer size" seems a bit overkill. First of all, it's not documented that such a thing exists and that by adjusting {{dfs.stream-buffer-size}} an administrator is also scaling these other buffer sizes. Seconds, I think any "small" buffer size should just use the default JDK buffer sizes. Anything that benefits from being larger than the default JDK size should be the controlled by {{IO_FILE_BUFFER_SIZE_KEY}} / {{dfs.stream-buffer-size}}. For reference, the default JDK size is 8K : [HDFS-14293]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org