hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-512) Set block id as the key to Block
Date Wed, 05 Aug 2009 21:52:14 GMT

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

Tsz Wo (Nicholas), SZE commented on HDFS-512:
---------------------------------------------

>From my understanding, we want to change some map keys from id + gs to id.  Then, we have
a few options
(1) change Block.compareTo(..) and Block.equals(..) to compare on id.
(2) change class of the map keys from Block to something else, say BlockId, which only uses
id (but not gs) to implement equals (and compareTo).
(3) use TreeMap with Block as the key but define a new Comparator which compare Block(s) with
id only.

Current patch implements option (1).  We may consider options (2) and (3).

> Set block id as the key to Block
> --------------------------------
>
>                 Key: HDFS-512
>                 URL: https://issues.apache.org/jira/browse/HDFS-512
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: Append Branch
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: Append Branch
>
>         Attachments: blockKey.patch
>
>
> Currently the key to Block is block id + generation stamp. I would propose to change
it to be only block id. This is based on the following properties of the dfs cluster:
> 1. On each datanode only one replica of block exists. Therefore there is only one generation
of a block.
> 2. NameNode has only one entry for a block in its blocks map.
> With this change, search for a block/replica's meta information is easier since most
of the time we know a block's id but may not know its generation stamp.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message