You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Yi Liu (JIRA)" <ji...@apache.org> on 2015/07/17 15:45:04 UTC
[jira] [Comment Edited] (HDFS-8795) Improve
InvalidateBlocks#node2blocks
[ https://issues.apache.org/jira/browse/HDFS-8795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14631351#comment-14631351 ]
Yi Liu edited comment on HDFS-8795 at 7/17/15 1:44 PM:
-------------------------------------------------------
I think in {{dump}}, we don't need to have a sorted result, if agree, I can remove the modification in {{dump}}.
was (Author: hitliuyi):
I think in {{dump}}, we don't need to have a sorted map, if agree, I can remove the modification in {{dump}}.
> Improve InvalidateBlocks#node2blocks
> ------------------------------------
>
> Key: HDFS-8795
> URL: https://issues.apache.org/jira/browse/HDFS-8795
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Yi Liu
> Assignee: Yi Liu
> Attachments: HDFS-8795.001.patch
>
>
> Currently we use {{TreeMap}} for {{node2blocks}}, actually there are only two place may need sorted: {{dump}}, {{getDatanodes}}. But {{getDatanodes}} is called by {{computeInvalidateWork}}, and we do a shuffle there, so the sort is unnecssary. For {{dump}}, certainly we need to make few modification.
> So we can use {{HashMap}}.
> From memory and performance view, {{HashMap}} is better than {{TreeMap}}, a simliar optimization HDFS-7433.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)