hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8607) TestFileCorruption doesn't work as expected
Date Tue, 16 Jun 2015 10:58:04 GMT

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

Hudson commented on HDFS-8607:
------------------------------

FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #230 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/230/])
HDFS-8607. TestFileCorruption doesn't work as expected. (Contributed by Walter Su) (arp: rev
32ffda1266c11dd98ce7f439a89fce206adf751a)
* hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileCorruption.java
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt


> TestFileCorruption doesn't work as expected
> -------------------------------------------
>
>                 Key: HDFS-8607
>                 URL: https://issues.apache.org/jira/browse/HDFS-8607
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.7.0
>            Reporter: Walter Su
>            Assignee: Walter Su
>             Fix For: 2.8.0
>
>         Attachments: HDFS-8607.01.patch
>
>
> Although it passes, it's useless.
> {code}
>  77  File[] blocks = data_dir.listFiles();
>  78  assertTrue("Blocks do not exist in data-dir", (blocks != null) && (blocks.length
> 0));
>  79  for (int idx = 0; idx < blocks.length; idx++) {
>  80    if (!blocks[idx].getName().startsWith(Block.BLOCK_FILE_PREFIX)) {
>  81      continue;
>  82    }
>  83    System.out.println("Deliberately removing file "+blocks[idx].getName());
>  84    assertTrue("Cannot remove file.", blocks[idx].delete());
>  85  }
> {code}
> blocks are located at finalized/subdir0/subdir0, but line 77 only returns "subdir0" because
{{File.listFiles()}} is not recursive. So line 83~84 will never be excuted.



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

Mime
View raw message