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

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

> .. Along the history, an invariant is that an under-construction block is-a 
> type of block. This is the is-a relationship that I think design #2 breaks.

As mentioned previously,  "The only drawback is that a BlockInfoUC is not a 
BlockInfo. It is fine since BlockInfoUC is only an interface – the 
implementation classes always is-a BlockInfo by the disgram below. We always 
can safely cast a BlockInfoUC object to BlockInfo."  Design #2 does not really 
break "an under-construction block is-a type of block".

> 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