[ 
https://issues.apache.org/jira/browse/HDFS-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Suresh Srinivas updated HDFS-1359:
----------------------------------

    Attachment: HDFS-1359.1.patch

Nicholas, thanks for the comments.

New patch address all but the following:
bq. You may have mentioned it somewhere earlier. What is the reason that 
ExtendedBlock includes Block as a field but not extending Block?
# Datanode and Namenode store local part of block without pool ID. The 
ExtendedBlock is sent only over protocols. It is optimal to build ExtendedBlock 
using the Block stored in NN and DN.
# Though names Block and ExtendedBlock suggest "is a" relationship, in reality 
the right names are LocalBlock and Block. Better relationship is ExtendedBlock 
"has a" local Block in it.

bq. In ExtendedBlock.write(..), it should call Block.write(..). Similar to 
ExtendedBlock.readFields(..)
This is what I want to do. However, {{ReplicaRecoveryInfo}}, which is a 
subclass of Block and implements {{write()}} method. ExtendedBlock built using 
it and sent in InterDatanodeProtocol.updateReplicaUnderRecovery() results in 
RPC issues on the server, since while serializing ReplicaRecoveryInfo is used 
and while deserializing Block is used.

The alternative ExtendedBlock building its own Block using the Block supplied 
does not work for Mock objects.

I am not happy about current serialization/deserialization of Block in 
ExtendedBlock, due to the intimate knowledge it has about what Block is 
constituted of. However that is the case in constructors, get methods any way.



> HDFS federation: Add BlockPoolID to block
> -----------------------------------------
>
>                 Key: HDFS-1359
>                 URL: https://issues.apache.org/jira/browse/HDFS-1359
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: Federation Branch
>
>         Attachments: HDFS-1359.1.patch, HDFS-1359.patch
>
>
> This is a subtask to HDFS-1052 to add BlockPoolID to Block.

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

Reply via email to