[
https://issues.apache.org/jira/browse/HADOOP-8709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440396#comment-13440396
]
Robert Joseph Evans commented on HADOOP-8709:
---------------------------------------------
If we do want different behavior we should add in a new API and deprecate the
old one. This is how most projects evolve while still maintaining backwards
compatibility. I like Chris's idea for the new API, and I would actually go a
step further and create an Glob class, that holds the base Path and the
regexp/pattern. That way other methods that may take a glob, like in Shell or
Util, it is obvious when something will be interpreted as a Glob and when it
will be interpreted as a Path. But all of that can and should be done in a
separate JIRA. I agree with Sanjay also. This new API should remove the null
return values. It will through a FNFE when the base path is not found, and will
return an empty iterator when the pattern does not match anything.
I think this solution would address all concerns. I am happy to file the
separate JIRA for the updated API and I owuld like to check in the current
patch, assuming that there are no objections to this.
> 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