[
https://issues.apache.org/jira/browse/HDFS-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337074#comment-14337074
]
Zhe Zhang commented on HDFS-7749:
---------------------------------
Thanks Jing for the solid work! The overall structure is very clear and the
main logics look good.
More detailed comments:
# As a quick note for our future refactor to abstract out a common
{{BlockInfoUnderConstruction}} class: the following added methods in
{{BlockInfo}} can be simplified:
#* {{convertToCompleteBlock}}
#* {{commitBlock}}
#* {{addReplica}}
#* {{getNumExpectedLocations}}
#* {{getExpectedStorageLocations}}
#* {{setExpectedLocations}}
#* {{getBlockRecoveryId}}
#* Seems {{convertToBlockUnderConstruction}} could be unified too
# Should {{BlockInfoStripedUnderConstruction#replicas}} represent a sorted list
of blocks in the group? If so seems we should update {{addReplicaIfNotPresent}}
to maintain the order while handling stale entries.
# This constructor could use some Javadoc as well:
{code}
public BlockInfoStripedUnderConstruction(Block blk, short dataBlockNum,
short parityBlockNum) {
this(blk, dataBlockNum, parityBlockNum, UNDER_CONSTRUCTION, null);
}
{code}
# Javadoc of {{convertToCompleteBlock}} method in both UC classes could be
updated with the correct return type. But they might be merged later anyway..
# Minor log message error in {{BlockInfoContiguousUnderConstruction}}
{code}
if (replicas.size() == 0) {
NameNode.blockStateChangeLog.warn("BLOCK*"
+ " BlockInfoUnderConstruction.initLeaseRecovery:"
+ " No blocks found, lease removed.");
}
{code}
# This will probably also be addressed when we abstract out the common
{{BlockInfoUnderConstruction}} class: should methods like {{commitBlock}} be
static?
# {{BlockManager#addStoredBlock}}: should we still check the block belongs to a
file?
{code}
- assert bc != null : "Block must belong to a file";
{code}
I'm still working on the patch after {{FSEditLog}}. Will finish the review soon.
> Erasure Coding: Add striped block support in INodeFile
> ------------------------------------------------------
>
> Key: HDFS-7749
> URL: https://issues.apache.org/jira/browse/HDFS-7749
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Jing Zhao
> Assignee: Jing Zhao
> Attachments: HDFS-7749.000.patch
>
>
> This jira plan to add a new INodeFile feature to store the stripped blocks
> information in case that the INodeFile is erasure coded.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)