You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2018/11/28 18:19:00 UTC

[jira] [Created] (HDFS-14111) hdfsOpenFile on HDFS causes unnecessary IO from file offset 0

Todd Lipcon created HDFS-14111:
----------------------------------

             Summary: 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


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: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org