hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8794) Improve CorruptReplicasMap#corruptReplicasMap
Date Fri, 17 Jul 2015 17:00:07 GMT

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

Arpit Agarwal commented on HDFS-8794:
-------------------------------------

Hi [~hitliuyi], thanks for starting this effort.

bq. Of course we need to make few change to getCorruptReplicaBlockIds.
Do you mean an additional fix to {{getCorruptReplicaBlockIds}} beyond your current patch is
needed? It looks like {{getCorruptReplicaBlockIds}} won't work in general since it assumes
the map is sorted. Can you add an {{\@VisibleForTesting}} annotation and also rename the function
to {{getCorruptReplicaBlockIdsForTesting}} so this function is not used inadvertently?

+1 otherwise.

> Improve CorruptReplicasMap#corruptReplicasMap
> ---------------------------------------------
>
>                 Key: HDFS-8794
>                 URL: https://issues.apache.org/jira/browse/HDFS-8794
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-8794.001.patch
>
>
> Currently we use {{TreeMap}} for {{corruptReplicasMap}}, actually the only need sorted
place is {{getCorruptReplicaBlockIds}} which is used by test.
> So we can use {{HashMap}}.
> From memory and performance view, {{HashMap}} is better than {{TreeMap}}, a simliar optimization
HDFS-7433. Of course we need to make few change to {{getCorruptReplicaBlockIds}}.



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

Mime
View raw message