[
https://issues.apache.org/jira/browse/HADOOP-8709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437059#comment-13437059
]
Daryn Sharp commented on HADOOP-8709:
-------------------------------------
I'm a bit uneasy with the incompatibility. I think the {{listStatus}} change
for java compat is fine. However, I agree with Jason that {{globStatus}} is
different. It's like a grep. When you call it, you don't know if the path
contains globs. You're just acknowledging that you are prepared to deal with
globs. The previous semantics allow you know if it is indeed a glob, and
whether it matches.
# null: not a glob & doesn't exist
# empty array: glob with no matches
# non-empty array: either existing path or expanded glob
Maybe it would be ok to throw FNF for a non-glob pattern that doesn't exist,
instead of returning null. However, a globbed pattern should always return an
array whether it matches or not so you know if it's a glob.
> 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