[
https://issues.apache.org/jira/browse/HDFS-14111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16780727#comment-16780727
]
Sahil Takiar commented on HDFS-14111:
-------------------------------------
Posted updated patch. Fixed comments provided by Todd.
The {{test_hdfs_ext_hdfspp_test_shim_static}} failure seems to be a genuine
issue caused by this patch. The failure seems to be due to the fact that
libhdfs++ and libhdfs have inconsistent handling of {{errno}}. For now, I
disabled the assertion that was failing, and filed a follow up JIRA HDFS-14325.
HDFS-14325 has more details, once it is fixed, we can add the assertion back in.
> hdfsOpenFile on HDFS causes unnecessary IO from file offset 0
> -------------------------------------------------------------
>
> Key: HDFS-14111
> URL: https://issues.apache.org/jira/browse/HDFS-14111
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client, libhdfs
> Affects Versions: 3.2.0
> Reporter: Todd Lipcon
> Assignee: Sahil Takiar
> Priority: Major
> Attachments: HDFS-14111.001.patch, HDFS-14111.002.patch,
> HDFS-14111.003.patch
>
>
> hdfsOpenFile() calls readDirect() with a 0-length argument in order to check
> whether the underlying stream supports bytebuffer reads. With DFSInputStream,
> the read(0) isn't short circuited, and results in the DFSClient opening a
> block reader. In the case of a remote block, the block reader will actually
> issue a read of the whole block, causing the datanode to perform unnecessary
> IO and network transfers in order to fill up the client's TCP buffers. This
> causes performance degradation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]