[
https://issues.apache.org/jira/browse/HDFS-8901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008545#comment-15008545
]
Kai Zheng commented on HDFS-8901:
---------------------------------
Thanks Walter for the review!
1. If the read buffer from upper call can contain n (equal or larger than 1)
cells, then the n cells based on the read buffer will be used as references
into the decode buffers, thus avoids data copy. Sure not all data copy are
avoided, in the worst case, if the user provided read buffer isn't the right
buffer type desired by the erasure coder, then all cells will need one time
copy.
2. This change is mainly to convert byte array to bytebuffer for positional
read. Using appropriate bytebuffer type according to erasure coder will be
handled in HDFS-8668 family.
3. The change into DFSInputStream is because this patch was based on HDFS-8905.
You're right the relying isn't essential.
> Use ByteBuffer in striping positional read
> ------------------------------------------
>
> Key: HDFS-8901
> URL: https://issues.apache.org/jira/browse/HDFS-8901
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Kai Zheng
> Assignee: Kai Zheng
> Attachments: HDFS-8901-v2.patch, initial-poc.patch
>
>
> Native erasure coder prefers to direct ByteBuffer for performance
> consideration. To prepare for it, this change uses ByteBuffer through the
> codes in implementing striping position read. It will also fix avoiding
> unnecessary data copying between striping read chunk buffers and decode input
> buffers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)