[ 
https://issues.apache.org/jira/browse/HDFS-8319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jing Zhao updated HDFS-8319:
----------------------------
    Attachment: HDFS-8319.003.patch

Thanks a lot for the review, guys! Update the patch to address comments. I will 
add more tests, fix bugs, and address follow-on issues in separate jiras.

The patch also adds the following changes:
# To reuse the block readers against data blocks, we have to track their 
current reading offset for the corresponding internal block. Also for their 
initialization, the current patch sets their starting block offset to the 
smallest offset among all the internal blocks. This is because for decoding 
sometimes we have to read "backwards" for extra data.
# We use a direct ByteBuffer as buffer for the stripe, while for parity data we 
use non-direct ByteBuffer (to save allocation time). But the current decoder 
code only checks the first input to determine whether using direct bytebuffer 
API. Thus I updated the decoder code and made it use direct bytebuffer API if 
there is at least one direct buffer in inputs/outputs.

BTW, the decoder code uses ByteBuffer#array() for non-direct bytebuffer cases. 
This can cause issue if inputs/outputs are derived from slices of the same 
underlying buffer.

> Erasure Coding: support decoding for stateful read
> --------------------------------------------------
>
>                 Key: HDFS-8319
>                 URL: https://issues.apache.org/jira/browse/HDFS-8319
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-8319.001.patch, HDFS-8319.002.patch, 
> HDFS-8319.003.patch
>
>
> HDFS-7678 adds the decoding functionality for pread. This jira plans to add 
> decoding to stateful read.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to