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

Colin Patrick McCabe commented on HADOOP-10942:
-----------------------------------------------

It seems like there's a bunch of things going on here:

* The globber will sometimes erroneously return a permission denied exception 
when there is a non-terminal wildcard.  For example, when listing {{/a*/b}}, if 
there is a file named /alpha, the glob will fail.  This bug does *not* occur 
for superusers, which is why the existing tests and casual testing didn't catch 
it.  You mention that this was a "fix" which was regressed between 0.23 and 
branch-2... is there a JIRA number for this already?

* Optimizations: you mention "doing a simple immediate file status if the path 
contains no globs, etc".  The existing code already does this.  It was added in 
HADOOP-9877.  Are we missing a case?  I didn't understand the comment about 
"Additional optimizations to reduce rpcs actually increases them if directories 
contain 1 item."  Which specific optimization(s) are increasing RPCs for you 
and how can we avoid this?

* You added a comment that "FileContext returns a path to the home dir of the 
user that started the jvm instead of the ugi user so we'll just workaround it." 
 I wasn't aware of this issue.  Is there a JIRA number?  This seems like an 
inconsistency that we should note in the test, along with a link to the JIRA 
that should fix it.

* There's a bunch of reorganization here, perhaps almost a rewrite of the main 
part of the globber.

Let's split these into separate JIRAs so that it's easier to review.

> Globbing optimizations and regression fix
> -----------------------------------------
>
>                 Key: HADOOP-10942
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10942
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 3.0.0, 2.1.0-beta
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Critical
>         Attachments: HADOOP-10942.patch
>
>
> When globbing was commonized to support both filesystem and filecontext, it 
> regressed a fix that prevents an intermediate glob that matches a file from 
> throwing a confusing permissions exception.  The hdfs traverse check requires 
> the exec bit which a file does not have.
> Additional optimizations to reduce rpcs actually increases them if 
> directories contain 1 item.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to