[
https://issues.apache.org/jira/browse/HADOOP-8709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437104#comment-13437104
]
Daryn Sharp commented on HADOOP-8709:
-------------------------------------
bq. [...] it does provide the ability to distinguish between a non-existent
expected directory level vs. a pattern matching nothing for some cases. I can
see some merit there.
The big demerit is now it's impossible to distinguish "not a glob, doesn't
exist" and "is a glob, but a parent dir doesn't exist" because FNF means
either. Let's say I want to create a path that doesn't exist iff it's not a
glob. How do I do that? I don't want to accidentally create a path with glob
metachars in it...
I think FNF should only be thrown for non-existent non-glob paths. That alone
is an incompatible change that requires a try block. Throwing FNF for any glob
path breaks the semantics of the method and there is no workaround.
> 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
>
>
> 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