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

Yi Liu commented on HDFS-8499:
------------------------------

Thanks Zhe for updating the patch.

I just noticed one thing:
{code}
boolean addStorage(DatanodeStorageInfo storage) {
+    return convertToCompleteBlock().addStorage(storage);
+  }
{code}
We actually have not done anything.  Since {{convertToCompleteBlock}} will 
create a new instance of {{BlockInfoContinuous}} (use continuous as example), 
and {{triplets}} is different, so the modification of the created 
{{BlockInfoContinous}} will not affect original instance (BlockInfoUC).
We should find another way...

{quote}
assert getBlockUCState() != HdfsServerConstants.BlockUCState.COMPLETE :
+        "BlockInfoContiguousUnderConstruction cannot be in COMPLETE state";
{quote}
We'd better to modify the string in the message too.  Besides using IDE to 
refactor, we'd better to search the String.

In BlockInfoUC, there are some methods should have different implementations 
for Continuous and Striped, for example, {{setExpectedLocations}}, currently 
the default in BlockInfoUC is for continuous, of course we can override it in 
striped. Maybe they should be abstract, and implemented in both continuous and 
striped, then it's more clear?  So I suggest if the implementation of some 
method is different for continuous and striped, then we make them abstract.

{quote}
>>> In BlockInfo, convertToBlockUnderConstruction should be abstract, and 
>>> continuous/striped block implement it.
Agreed. Will address in the next rev.
{quote}
Seems you missed this?  

Let's also wait for Jing if he has some suggestions.  Besides, I want to see 
the Jenkins to make sure we didn't miss anything.

> Merge BlockInfoUnderConstruction into trunk
> -------------------------------------------
>
>                 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
>         Attachments: HDFS-8499.00.patch, HDFS-8499.01.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