[
https://issues.apache.org/jira/browse/HDFS-10569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346506#comment-15346506
]
Daryn Sharp commented on HDFS-10569:
------------------------------------
It's a dead/uncalled code path. The NN uses the iterator interface to
decode/process the obsolete encoding, not this method. This is why the unit
tests don't catch it.
Otherwise, the block report would be corrupted since it's 2 longs for size
followed by a tuple of 3 longs per block. Shift that down and the block report
is completely mangled. A NN would never come out of safemode.
So we could throw UnsupportedOperationException, or if it's fixed, a unit test
should be added.
> A bug causes OutOfIndex error in BlockListAsLongs
> -------------------------------------------------
>
> Key: HDFS-10569
> URL: https://issues.apache.org/jira/browse/HDFS-10569
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.7.0
> Reporter: Weiwei Yang
> Assignee: Weiwei Yang
> Priority: Minor
> Attachments: HDFS-10569.001.patch
>
>
> An obvious bug in LongsDecoder.getBlockListAsLongs(), the size of var *longs*
> is +2 to the size of *values*, but the for-loop accesses *values* using
> *longs* index. This will cause OutOfIndex.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]