[
https://issues.apache.org/jira/browse/HDFS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739620#action_12739620
]
Hairong Kuang commented on HDFS-512:
------------------------------------
> This is probably a good time to add Block to ReplicaInfo.
I already redefined ReplicaInfo in HDFS-509 where ReplicaInfo extends Block.
This patch provides only a temporary fix if HDFS-509 gets committed later.
> If we follow Raghu's suggestion, can we continue using the genstamp as part
> of the Block key?
In both NN and DN, blocksMap and replicasMap do not need gen stamp as part of
the Block key. DN can provision read if it has a replica with a gen stamp equal
to or newer than the one in the request. With the new design, if DN receives a
write request with a recovery flag, it can satisfy the request if it has a
replica with a gen stamp equal to or newer than the one in the write request.
The key question is that does HDFS have any maps or sets that need to contain
two instances of Block with the same block id but different gen stamps. If the
answer is no, we can safely remove the gen stamp as part of the Block key.
> 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.