[ 
https://issues.apache.org/jira/browse/HDFS-11370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15840282#comment-15840282
 ] 

Jing Zhao commented on HDFS-11370:
----------------------------------

Thanks for working on this, [~tasanuma0829]. The current patch looks good to 
me. Some further thoughts:
# In {{getReplicaInfo}} what we need is actually an iterator/iterable of 
storages (used by the for loop). However, currently we're using a storage[], 
and for completed blockInfo we always need to 1) allocate a storage[], 2) get 
an iterator of the storages, and 3) copy all the storages into the array. This 
is unnecessary.
# So how about we provide an iterator/iterable in the UC feature to get all the 
expected locations? Then for completed blocks we can avoid the unnecessary copy.

What do you think?

> Optimize NamenodeFsck#getReplicaInfo
> ------------------------------------
>
>                 Key: HDFS-11370
>                 URL: https://issues.apache.org/jira/browse/HDFS-11370
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Takanobu Asanuma
>            Assignee: Takanobu Asanuma
>            Priority: Minor
>         Attachments: HDFS-11370.1.patch
>
>
> We can optimize the logic of calculating the number of storages in 
> {{NamenodeFsck#getReplicaInfo}}. This is a follow-on task of HDFS-11124.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to