[
https://issues.apache.org/jira/browse/HDFS-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Li updated HDFS-2655:
-----------------------------
Attachment: HDFS-2655.txt
Modified BlockReaderLocal.skip() method to be more efficient:
1. if the new position offset is already read, just reposition the dataBuff
2. if the new position offset is just a small gap from the last read byte, only
read the small gap
3. if there is a big gap(>bytesPerChecksum) from last read byte to new
position, discard the buffers, skip to the last he beginning of the appropriate
checksum chunk and then read to the middle of that chunk to be in sync with
checksums.
A test is also added to test skip function.
> BlockReaderLocal#skip performs unnecessary IO
> ---------------------------------------------
>
> Key: HDFS-2655
> URL: https://issues.apache.org/jira/browse/HDFS-2655
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: data-node
> Affects Versions: 0.23.1
> Reporter: Eli Collins
> Assignee: Brandon Li
> Attachments: HDFS-2655.txt
>
>
> Per HDFS-2654 BlockReaderLocal#skip performs the skip by reading the data so
> we stay in sync with checksums. This could be implemented more efficiently in
> the future to skip to the beginning of the appropriate checksum chunk and
> then only read to the middle of that chunk.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira