hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories
Date Fri, 10 Jun 2011 23:56:59 GMT

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

Hadoop QA commented on HDFS-1475:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12482109/HDFS-1475.patch
  against trunk revision 1134458.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 8 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit
warnings.

    -1 core tests.  The patch failed these core unit tests:
                  org.apache.hadoop.cli.TestHDFSCLI

    +1 contrib tests.  The patch passed contrib unit tests.

    +1 system test framework.  The patch passed system test framework compile.

Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/770//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/770//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/770//console

This message is automatically generated.

> Want a -d flag in hadoop dfs -ls : Do not expand directories
> ------------------------------------------------------------
>
>                 Key: HDFS-1475
>                 URL: https://issues.apache.org/jira/browse/HDFS-1475
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs client
>    Affects Versions: 0.23.0
>         Environment: any
>            Reporter: Greg Connor
>            Assignee: Daryn Sharp
>            Priority: Minor
>         Attachments: HDFS-1475.patch
>
>
> I would really love it if dfs -ls had a -d flag, like unix ls -d, which would list the
directories matching the name or pattern but *not* their contents.
> Current behavior is to expand every matching dir and list its contents, which is awkward
if I just want to see the matching dirs themselves (and their permissions).  Worse, if a directory
exists but is empty, -ls simply returns no output at all, which is unhelpful.  
> So far we have used some ugly workarounds to this in various scripts, such as
>   -ls /path/to |grep dir   # wasteful, and problematic if "dir" is a substring of the
path
>   -stat /path/to/dir "Exists"  # stat has no way to get back the full path, sadly
>   -count /path/to/dir  # works but is probably overkill.
> Really there is no reliable replacement for ls -d -- the above hacks will work but only
for certain isolated contexts.  (I'm not a java programmer, or else I would probably submit
a patch for this, or make my own jar file to do this since I need it a lot.)

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

Mime
View raw message