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

Daryn Sharp commented on HADOOP-7378:
-------------------------------------

Thanks for the review!

# Sure, I was not aware of this static file.
# I had considered this myself before posting the patch, but it will move the 
single negation of a {{getOpt}} call into multiple negations in the following 
comparisons (ex. {{!noDirRecurse}}).
# There are two possible recursions in {{ls}}:
#* A recursion handled by the base class if {{setRecursive(true)}}.  This is 
set by {{-R}}, but trumped by {{-d}}.  Overall recursion can't occur if dirs 
aren't going to be descended, hence the combination. (answers question)
#* A recursion of any dir on the cmdline, regardless of {{-R}}, unless {{-d}} 
is used.  This is implemented in the {{ls}} command's {{processPathArgument}}. 
(just fyi)
# The linked jira HDFS-1475 contains the requested tests.

Per the additional comment, I'll add the "ls -d dir*" test case.  Like the unix 
shell, args are first expanded before being processed, so this case should work 
fine.

> hadoop dfs -ls : Do not expand directories (was HDFS-1475)
> ----------------------------------------------------------
>
>                 Key: HADOOP-7378
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7378
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 0.23.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>         Attachments: HADOOP-7378.patch
>
>
> In a nutshell, ls needs the ability to list a directory but not its contents. 
>  W/o -d, it is impossible to list the root directory's owner, permissions, 
> etc.  See the original hdfs bug for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to