[
https://issues.apache.org/jira/browse/HDFS-8453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14560478#comment-14560478
]
Zhe Zhang commented on HDFS-8453:
---------------------------------
Thanks Walter for reviewing.
bq. I didn't see any difference between refreshLocatedBlock and old version's
getBlockAt
{{DFSInputStream#refreshLocatedBlock}} just calls {{getBlockAt}}. The purposing
of having the {{refreshLocatedBlock}} in the base class is so that we can
extend it in {{DFSStripedInputStream#refreshLocatedBlock}}. This way
{{actualGetFromOneDatanode}} will call the extended method, if the file is
striped.
And yes, this patch gives the group's start offset to all internal blocks. I
think combined with the new {{refreshLocatedBlock}} method, this allows us to
identify an internal block with an offset.
{code}
+ bg.getStartOffset(), bg.isCorrupt(), null);
{code}
> Erasure coding: properly assign start offset for internal blocks in a block
> group
> ---------------------------------------------------------------------------------
>
> Key: HDFS-8453
> URL: https://issues.apache.org/jira/browse/HDFS-8453
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Zhe Zhang
> Assignee: Zhe Zhang
> Attachments: HDFS-8453-HDFS-7285.00.patch
>
>
> {code}
> void actualGetFromOneDataNode(final DNAddrPair datanode,
> ...
> LocatedBlock block = getBlockAt(blockStartOffset);
> ...
> fetchBlockAt(block.getStartOffset());
> {code}
> The {{blockStartOffset}} here is from inner block. For parity blocks, the
> offset will overlap with the next block group, and we may end up with
> fetching wrong block. So we have to assign a meaningful start offset for
> internal blocks in a block group, especially for parity blocks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)