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

Zhe Zhang commented on HDFS-8499:
---------------------------------

[~szetszwo]: As mentioned above I'm open to reworking the {{BlockInfo}} 
structure to resolve the discrepancy and unblock EC branch rebasing.

In the reworked structure, is your main requirement among the following? I 
summarized from the comments. Apologies if I missed anything.
* Being able to cast (and {{instanceof}}) between {{BIContiguous}} / 
{{BIContiguousUC}} and {{BIStriped}} / {{BIStripedUC}}
* Sharing code between {{BIContiguous}} / {{BIContiguousUC}} and {{BIStriped}} 
/ {{BIStripedUC}}
* Flexibility to implement the two UC classes differently. (BTW, how about 
{{BIContiguous}} and {{BIStriped}}? Do you think we should maintain the 
flexibility for completely different implementations?).

I'm more concerned about other NN modules relying on type reflections and 
casting in this multi-inheritance scenario (first item on the above list). So 
I'm OK if you'd like to change to design [#2 | 
https://issues.apache.org/jira/browse/HDFS-8499?focusedCommentId=14632040&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14632040]
 as an intermediate solution. 

If we do that, I still prefer to refactor NN code to replace 
{{BlockInfoStriped}} type casting with explicit {{isStriped()}} checks and move 
some getters up to {{BlockInfo}} level. 

> 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