[ https://issues.apache.org/jira/browse/HDFS-8319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14573821#comment-14573821 ]
Jing Zhao commented on HDFS-8319: --------------------------------- Thanks a lot for the review, Zhe! bq. Is it possible that a failed or canceled request has also changed the internal state of the block reader? If so we might skip too much. Currently for failed requests I directly set the corresponding block reader to null and the offset to 0. In this way we can avoid using the failed reader any more (whether this strategy is too aggressive and if we should retry the same DN still need more exploration, and I will do that as follow-on work). Also we add a new read request only when we hit a missing block. Thus in general I guess we're safe here. bq. Preconditions.checkState(blockReaderOffsets[result.index] == alignedStripe.getOffsetInBlock()); This precondition cannot always hold since before reading finishes the offset may be smaller than the stripe's offset (and that's why we need the skip). Also we already have checks in {{readCell}}. bq. {{updateState4SuccessRead}} should be a private method of {{StatefulStripeReader}} Here we have to call this method in {{readStripe}} of the base class thus I make it as an abstract method. I will update the patch to address all the other comments. > 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-8319.004.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)