[
https://issues.apache.org/jira/browse/HDFS-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769788#comment-16769788
]
Sahil Takiar commented on HDFS-3246:
------------------------------------
I guess I don't have permissions to attach files to this JIRA, I've put the
patch into a gist for reference:
[https://gist.github.com/sahilTakiar/4c24fb2980e9fa2787f519ea04d1c6d9]
A summary of the changes:
* Adds a new interface called {{ByteBufferPositionedReadable}} with a single
method: {{int read(long position, ByteBuffer buf)}}
* Adds the interface to {{FSDataInputStream}} and {{DFSInputStream}} -
integration with {{DFSInputStream}} is pretty simple straightforward because
the {{pread}} method already uses {{ByteBuffer}}
* Adds Java unit tests to make sure the new interface works correctly with
{{DFSInputStream}}
* Adds integration to libhdfs via a new helper method call {{preadDirect}}
which works in a similar manner to {{readDirect}}
* Adds new unit tests for the changes to libhdfs, however, the changes are
dependent on getting HDFS-14267 merged first
> pRead equivalent for direct read path
> -------------------------------------
>
> Key: HDFS-3246
> URL: https://issues.apache.org/jira/browse/HDFS-3246
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs-client, performance
> Affects Versions: 3.0.0-alpha1
> Reporter: Henry Robinson
> Assignee: Chen Zhang
> Priority: Major
>
> There is no pread equivalent in ByteBufferReadable. We should consider adding
> one. It would be relatively easy to implement for the distributed case
> (certainly compared to HDFS-2834), since DFSInputStream does most of the
> heavy lifting.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]