[
https://issues.apache.org/jira/browse/HDFS-5634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colin Patrick McCabe updated HDFS-5634:
---------------------------------------
Attachment: HDFS-5634.001.patch
This change allows the BlockReaderLocal to switch back and forth between
mlocked and non-mlocked states. (Later, we will hook up callbacks from code
added by HDFS-5182 to do this).
A few other changes:
* honor the readahead parameter, so that skipping checksums doesn't mean
skipping all buffering. See HDFS-4710 of the discussion of why we want this.
* for reads to a direct ByteBuffer, add a "fast lane" that copies directly into
the user-supplied ByteBuffer. We only do this if the read is longer than our
configured readahead. This avoids a copy.
* use pread everywhere instead of read. This means that if a client opens a
file multiple times, they only need one set of file descriptors rather than
multiple. This will become more important with HDFS-5182, since that change
will add a notification system per set of FDs. We don't want to track too many
of those.
* move reading of the meta file header out of the {{BlockReaderLocal}}
constructor. This will allow us to implement HDFS-4960 (only read version
once). This is mainly a win in the no-checksum case.
* avoid using a skip buffer in BlockReaderLocal#skip (implements HDFS-5574)
> allow BlockReaderLocal to switch between checksumming and not
> -------------------------------------------------------------
>
> Key: HDFS-5634
> URL: https://issues.apache.org/jira/browse/HDFS-5634
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Affects Versions: 3.0.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HDFS-5634.001.patch
>
>
> BlockReaderLocal should be able to switch between checksumming and
> non-checksumming, so that when we get notifications that something is mlocked
> (see HDFS-5182), we can avoid checksumming when reading from that block.
--
This message was sent by Atlassian JIRA
(v6.1#6144)