[
https://issues.apache.org/jira/browse/HDFS-9716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128008#comment-15128008
]
Walter Su commented on HDFS-9716:
---------------------------------
You can easily reproduce the failure by delay line 345 with a breakpoint or a
sleep, so NN has time to invalidate the replica.
{code}
339 // Check the replica on the new target node.
340 for (int i = 0; i < toRecoverBlockNum; i++) {
341 File replicaAfterRecovery = cluster.getBlockFile(targetDNs[i],
blocks[i]);
342 LOG.info("replica after recovery " + replicaAfterRecovery);
343 File metadataAfterRecovery =
344 cluster.getBlockMetadataFile(targetDNs[i], blocks[i]);
345 assertEquals(replicaAfterRecovery.length(), replicas[i].length());
346 LOG.info("replica before " + replicas[i]);
347 assertTrue(metadataAfterRecovery.getName().
348 endsWith(blocks[i].getGenerationStamp() + ".meta"));
349 byte[] replicaContentAfterRecovery =
350 DFSTestUtil.readFileAsBytes(replicaAfterRecovery);
351
352 Assert.assertArrayEquals(replicaContents[i],
replicaContentAfterRecovery);
353 }
354 }
{code}
> o.a.h.hdfs.TestRecoverStripedFile fails intermittently in trunk
> ---------------------------------------------------------------
>
> Key: HDFS-9716
> URL: https://issues.apache.org/jira/browse/HDFS-9716
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Mingliang Liu
> Assignee: Walter Su
> Labels: test
> Attachments: HDFS-9716.01.patch
>
>
> See recent builds:
> *
> https://builds.apache.org/job/PreCommit-HDFS-Build/14269/testReport/org.apache.hadoop.hdfs/TestRecoverStripedFile/testRecoverThreeDataBlocks1/
> *
> https://builds.apache.org/job/PreCommit-HADOOP-Build/8477/testReport/org.apache.hadoop.hdfs/TestRecoverStripedFile/testRecoverThreeDataBlocks/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)