[ https://issues.apache.org/jira/browse/HDFS-8499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhe Zhang updated HDFS-8499: ---------------------------- Attachment: HDFS-8499.05.patch Thanks Yi for the review! Uploading 05 patch to address the comments. Putting the static methods in {{BlockInfoContiguous}} sounds a good idea. Then we face 2 choices in structuring {{BIStriped}} and {{BIUCStriped}}: # We can handle them similarly as the 2 contiguous classes. The static methods will verify the {{BlockInfo}} from the argument is {{instanceof}} either {{BIStriped}} or {{BIUCStriped}}, and so some type casting. This is because the static methods need to operate on both the {{triplets}} and {{indices}}. # We can also explicitly create an interface for {{BIStriped}} and {{BIUCStriped}}. I will file a separate JIRA for the 2 striped classes and start writing a patch. The update patch also moves the implementation of 3 methods to {{BIUCContiguous}}: {{setExpectedLocations}}, {{getTruncateBlock}} and {{setTruncateBlock}}. I manually compared the striped and contiguous UC classes in the branch and only these 3 have different logics. > 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, > HDFS-8499.02.patch, HDFS-8499.03.patch, HDFS-8499.04.patch, > HDFS-8499.05.patch, HDFS-8499.UCFeature.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)