[ 
https://issues.apache.org/jira/browse/HADOOP-8709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439826#comment-13439826
 ] 

Daryn Sharp commented on HADOOP-8709:
-------------------------------------

The issue with inconsistently throwing FNF for a glob depending on a parent dir 
makes it harder to tell if something is a non-existent glob.  I'd rather not 
risk having issues with {{FsShell}} reverting to 1.x behavior of sometimes 
unexpectedly creating paths with glob chars in them.  Or user code for that 
matter.

If left as-is, I think we'll need to change MR code that tries to batch up 
certain exceptions.  It doesn't expect an IOException, so it rips further up 
the stack and discards the batched exceptions.  I'm sure there's plenty of user 
code not expecting IOException either.  Esp. in case like 
"/path-exists/$TIMESTAMP/*.dat" where it used to return an empty array, but now 
throws an exception because $TIMESTAMP doesn't exist yet.

This just seems like an extremely risky change inadvertently caused by the 
listStatus change (which I think is generally ok).  Why don't we consider 
adding a {{globStatus(Path, boolean)}} to control whether exceptions will be 
thrown?
                
> 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

        

Reply via email to