[
https://issues.apache.org/jira/browse/HADOOP-12009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14639742#comment-14639742
]
Jakob Homan commented on HADOOP-12009:
--------------------------------------
I've verified that the latest patch (v4) fixes the observed test failures
(munged the test to verify the contract implementations were getting the latest
versions and still passing). I'm going to go ahead and commit.
bq. If the patch is causing problems, I suggest that before it gets committed
the full contract test suite —including the s3, openstack and azure suites— get
run before we put this in.
Are there instructions for that? Are any vendors providing that service?
> Clarify FileSystem.listStatus() sorting order & fix
> FileSystemContractBaseTest:testListStatus
> ----------------------------------------------------------------------------------------------
>
> Key: HADOOP-12009
> URL: https://issues.apache.org/jira/browse/HADOOP-12009
> Project: Hadoop Common
> Issue Type: Improvement
> Components: test
> Reporter: Jakob Homan
> Assignee: J.Andreina
> Priority: Minor
> Attachments: HADOOP-12009-003.patch, HADOOP-12009-004.patch,
> HADOOP-12009.1.patch
>
>
> FileSystem.listStatus does not guarantee that implementations will return
> sorted entries:
> {code} /**
> * List the statuses of the files/directories in the given path if the path
> is
> * a directory.
> *
> * @param f given path
> * @return the statuses of the files/directories in the given patch
> * @throws FileNotFoundException when the path does not exist;
> * IOException see specific implementation
> */
> public abstract FileStatus[] listStatus(Path f) throws
> FileNotFoundException,
> IOException;{code}
> However, FileSystemContractBaseTest, expects the elements to come back sorted:
> {code} Path[] testDirs = { path("/test/hadoop/a"),
> path("/test/hadoop/b"),
> path("/test/hadoop/c/1"), };
>
> // ...
> 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());{code}
> We should pass this test as long as all the paths are there, regardless of
> their ordering.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)