[
https://issues.apache.org/jira/browse/HDFS-8202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14645270#comment-14645270
]
Zhe Zhang commented on HDFS-8202:
---------------------------------
Thanks Xinwei for updating the patch. The patch LGTM except for the following
minor issues:
# {{TestReadStripedFileWithDecoding}} has an unused import and {{import
org.apache.hadoop.hdfs.protocol.*}}
# We should probably convert {{Assert.fail}} to {{assertTrue}}.
{code}
int recoverBlkNum = dataBlkDelNum + parityBlkDelNum;
if (dataBlkDelNum < 0 || parityBlkDelNum < 0) {
Assert.fail("dataBlkDelNum and parityBlkDelNum should be positive");
}
if (recoverBlkNum > parityBlocks) {
Assert.fail("The sum of " +
"dataBlkDelNum and parityBlkDelNum should be between 1 ~ "
+ parityBlocks);
}
{code}
# We can add some randomness to the following code, maybe as a follow-on:
{code}
for (int i = 0; i < indices.length; i++) {
if (j < dataBlkDelNum) {
if (indices[i] < dataBlocks) {
delDataBlkIndices[j++] = i;
}
}
if (k < parityBlkDelNum) {
if (indices[i] >= dataBlocks) {
delParityBlkIndices[k++] = i;
}
}
}
{code}
# Calling {{TestDFSStripedOutputStreamWithFailure#killDatanode}} from its peer
class ({{TestWriteStripedFileWithFailure}}) doesn't look very neat. As a
follow-on we can move it to a utility class.
# {{TestWriteStripedFileWithFailure}} actually fails, could you debug the
issue? Thanks.
> Improve end to end stirpping file test to add erasure recovering test
> ---------------------------------------------------------------------
>
> Key: HDFS-8202
> URL: https://issues.apache.org/jira/browse/HDFS-8202
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Kai Zheng
> Assignee: Xinwei Qin
> Attachments: HDFS-8202-HDFS-7285.003.patch,
> HDFS-8202-HDFS-7285.004.patch, HDFS-8202-HDFS-7285.005.patch,
> HDFS-8202.001.patch, HDFS-8202.002.patch
>
>
> This to follow on HDFS-8201 to add erasure recovering test in the end to end
> stripping file test:
> * After writing certain blocks to the test file, delete some block file;
> * Read the file content and compare, see if any recovering issue, or verify
> the erasure recovering works or not.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)