[
https://issues.apache.org/jira/browse/HDFS-5009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756146#comment-13756146
]
Tsz Wo (Nicholas), SZE commented on HDFS-5009:
----------------------------------------------
Junping, thanks for comments.
> ... Do we expect storageIDs to be null or empty while DatanodeID[] is not
> empty? ...
I was considering the case that a new version namenode may talk to an old
version datanode. Actually, this case is impossible since the namenode won't
have any storage information of that datanode and so it is impossible to
randomly choose a storage. I will update the patch.
> ... we should check length of storageIDs and datanodeID to be equal as it may
> cause ArrayIndexOutOfBoundException ...
The ClientProtocol and other RPC protocols are not open protocols. We write
both the client and the server code and we assume they both follow the
protocol. In general, we won't do much parameter validation since we assume
the other end is well behaved. In this case, if there an
ArrayIndexOutOfBoundException, it means that there is a bug in the code and we
should fix it.
> ... we do something simpler as below? ...
Both toDatanodeInfos(..) are invoked in the code. That's why there are two.
> ... Within HDFS-2832, we may count in storage type in sorting. ...
It seems that it may not be useful to count storage type in sorting because a
datanode won't have two copies of a block in two different storages. What do
you think?
> ... More comments may come later.
Please. Your comments are very useful.
> NameNode should expose storage information in the LocatedBlock
> --------------------------------------------------------------
>
> Key: HDFS-5009
> URL: https://issues.apache.org/jira/browse/HDFS-5009
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Affects Versions: 3.0.0
> Reporter: Arpit Agarwal
> Assignee: Tsz Wo (Nicholas), SZE
> Attachments: h5009_20130830.patch, h5009_20130831.patch
>
>
> The storage type is optionally reported by the DataNode along with block
> report. The NameNode should make this information available to clients via
> LocatedBlock.
> Also, LocatedBlock is used in reportBadBlocks(..). We should add storage ID
> to LocatedBlock.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira