[
https://issues.apache.org/jira/browse/HADOOP-8709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439909#comment-13439909
]
Daryn Sharp commented on HADOOP-8709:
-------------------------------------
The shell uses all the documented semantics.
Currently, sometimes FNFE and sometimes empty array for the same condition
seems bizarre. I don't understand why there should be a difference between
"/a/nonExist/c*" and "/a/nonExist*/c"? Let's say they are consistent and both
throw FNFE. Now that would mean "/a/{nonExist,maybeExist}/c*" should throw
(for consistency) even though there are some matches? That defeats the purpose
of "tell me what might exist that matches this pattern". It's really hard for
the caller to understand the context-sensitive nature of when it might throw.
Users are unlikely to handle all the conditions correctly, leading to odd edges
based on the given path.
It makes my head hurt just thinking about it, which is why I keep leaning
towards the currently documented semantics which are very clear.
> globStatus changed behavior from 0.20/1.x
> -----------------------------------------
>
> Key: HADOOP-8709
> URL: https://issues.apache.org/jira/browse/HADOOP-8709
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0, 2.0.0-alpha
> Reporter: Jason Lowe
> Assignee: Jason Lowe
> Priority: Critical
> Attachments: HADOOP-8709.patch, HADOOP-8709.patch
>
>
> In 0.20 or 1.x, globStatus will return an empty array if the glob pattern
> does not match any files. After HADOOP-6201 it throws FileNotFoundException.
> The javadoc states it will return an empty array.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira