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

Takanobu Asanuma commented on HDFS-11122:
-----------------------------------------

Thanks for working on this, [~linyiqun].

{{MiniDFSCluster#corruptBlockOnDataNodes}} does not assure that the datanodes 
recognize the corrupt block. I think it would be good to read the file to make 
sure to call {{ClientProtocol#reportBadBlocks}} after creating the corrupt 
block.

{code:java}
final int blockFilesCorrupted = miniCluster
    .corruptBlockOnDataNodes(block);
assertEquals("Fail to corrupt all replicas for block " + block,
    replFactor, blockFilesCorrupted);
try {
  IOUtils.copyBytes(fs.open(file), new IOUtils.NullOutputStream(),
      conf, true);
} catch (IOException ie) {
  assertTrue(ie instanceof ChecksumException);
}
{code}

> TestDFSAdmin.testReportCommand fails due to timed out
> -----------------------------------------------------
>
>                 Key: HDFS-11122
>                 URL: https://issues.apache.org/jira/browse/HDFS-11122
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Minor
>         Attachments: HDFS-11122.001.patch, HDFS-11122.002.patch
>
>
> After HDFS-11083, the test {{TestDFSAdmi}} fails sometimes dueto timed out. 
> The stack 
> infos(https://builds.apache.org/job/PreCommit-HDFS-Build/17484/testReport/):
> {code}
> java.lang.Exception: test timed out after 30000 milliseconds
>       at java.lang.Thread.sleep(Native Method)
>       at 
> org.apache.hadoop.test.GenericTestUtils.waitFor(GenericTestUtils.java:268)
>       at 
> org.apache.hadoop.hdfs.tools.TestDFSAdmin.testReportCommand(TestDFSAdmin.java:540)
> {code}
> The timed out is happened in {{GenericTestUtils.waitFor}}. We can make a 
> improvement in the logic of waiting the corrupt blocks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to