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

Tsz Wo Nicholas Sze commented on HDFS-8499:
-------------------------------------------

> ... could you share some thoughts on how to solve the multi-inheritance 
> problem?

As mentioned previously, ' They also can be constructuced in a completely 
different way. Indeed, BlockInfoContiguous is constructed by a write pipeline 
and BlockInfoStriped is constructed by parallel write. Therefore, 
BlockInfoContiguousUC and BlockInfoStripedUC may not share a lot of common 
code. However, Design #1 assumes both BlockInfoContiguous and BlockInfoStriped 
can be constructed in a similar way."

Let's check BlockInfoUnderConstructionContiguous and 
BlockInfoUnderConstructionStriped in the HDFS-7285 branch.  They have a 
different way to implement setExpectedLocations and addReplicaIfNotPresent.  I 
beg BlockInfoUnderConstructionStriped also need a different implementation of 
initializeBlockRecovery.  Also, BlockInfoUnderConstructionContiguous supports 
truncate but BlockInfoUnderConstructionStriped does not.  This is the 
flexibility we want.

Although both BlockInfoUnderConstructionContiguous and 
BlockInfoUnderConstructionStriped implement the notion of UC, they only share 
mostly the interface but not the implementation.

> Refactor BlockInfo class hierarchy with static helper class
> -----------------------------------------------------------
>
>                 Key: HDFS-8499
>                 URL: https://issues.apache.org/jira/browse/HDFS-8499
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: 2.7.0
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>             Fix For: 2.8.0
>
>         Attachments: HDFS-8499.00.patch, HDFS-8499.01.patch, 
> HDFS-8499.02.patch, HDFS-8499.03.patch, HDFS-8499.04.patch, 
> HDFS-8499.05.patch, HDFS-8499.06.patch, HDFS-8499.07.patch, 
> HDFS-8499.UCFeature.patch, HDFS-bistriped.patch
>
>
> In HDFS-7285 branch, the {{BlockInfoUnderConstruction}} interface provides a 
> common abstraction for striped and contiguous UC blocks. This JIRA aims to 
> merge it to trunk.



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

Reply via email to