hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah Watkins <jayh...@soe.ucsc.edu>
Subject FileSystem contract of listStatus
Date Wed, 02 Nov 2011 22:57:59 GMT
I have a question about the FileSystem contract in 0.20.

In FileSystemContractBaseBaseTest:testFileStatus() there
are several files created, and afterwards the test confirms
that they are present. Here is the relevant code:

    FileStatus[] paths = fs.listStatus(path("/test"));

    paths = fs.listStatus(path("/test/hadoop"));
    assertEquals(3, paths.length);
    assertEquals(path("/test/hadoop/a"), paths[0].getPath());
    assertEquals(path("/test/hadoop/b"), paths[1].getPath());
    assertEquals(path("/test/hadoop/c"), paths[2].getPath());

This test will fail if the results are not in the specific
order. Is this ordering (alphanumeric?) part of the contract?
Can FileSystem return results from listStatus() in any order?


View raw message