[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-10 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HDFS-1475:


I suspect this is a) an incompatible change and b) will therefore require a 
release note.

> 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


[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-10 Thread Hadoop QA (JIRA)

[ 
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


[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Daryn Sharp (JIRA)

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

Daryn Sharp commented on HDFS-1475:
---

I have no problem marking it incompatible, but I guess I'm unclear on what 
constitutes an incompatible change.  The patch doesn't alter any of the 
pre-existing behavior -- it just adds another option.  Are enhancements 
considered incompatible?

BTW, the test failed because the corresponding hadoop jira is not integrated.

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HDFS-1475:


Woops, I actually meant that comment for HADOOP-7378.  

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Daryn Sharp (JIRA)

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

Daryn Sharp commented on HDFS-1475:
---

I'm still a bit confused.  Are enhancements deemed incompatible?

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HDFS-1475:


err, changing -l.

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HDFS-1475:


Changing the output of an existing command will definitely break people.  So -d 
support wouldn't be, but changing the behavior of -l definitely is.

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HDFS-1475:


grr. -ls.  *needs sleep and edit mode*

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Daryn Sharp (JIRA)

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

Daryn Sharp commented on HDFS-1475:
---

I understand! I posted broken english on a jira before I had my coffee. :)

As for the patch, I'm puzzled by the seemingly contradictory statement that 
adding -d isn't incompatible, but changing the behavior of ls is incompatible.  
Perhaps I'm misunderstanding?  The current output and behavior hasn't been 
changed at all.  I think the only dubious scenario where breakage would occur 
is if a script currently invokes "-ls -d ..." and expects it to fail.  Am I 
missing something?

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HDFS-1475:


My read of this JIRA in combination with HADOOP-7378 seemed to hint at a change 
in -ls's default behavior.  Thus why I said "suspected" above.  If that isn't 
the case, then we're good to go.  If it does change it, we're still good to 
go*... we just need to flag one of these as an incompatible change and throw a 
release note in there so folks aren't surprised.

* - despite what some might think, I've actually wanted more things to break 
inbetween releases than what most of the other devs have wanted.  I'd rather 
break things now, even in really horrible ways, before we hit 1.0 than after.  
This includes -ls's default behavior, which I think is... less than useful.

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-06-13 Thread Daryn Sharp (JIRA)

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

Daryn Sharp commented on HDFS-1475:
---

Ok, great!  Then this patch isn't incompatible.  I do also completely agree 
with you about the behavior of ls.  For months I've wanted to change ls to 
behave just like unix ls but held back for fear of an incompatibility 
backlash..

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-07-19 Thread Suresh Srinivas (JIRA)

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

Suresh Srinivas commented on HDFS-1475:
---

Please add ls -d dir* test case.

> 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-07-27 Thread Suresh Srinivas (JIRA)

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

Suresh Srinivas commented on HDFS-1475:
---

+1 for the patch. Will commit this after HADOOP-7378.

> 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-2.patch, 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




[jira] [Commented] (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2011-07-27 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HDFS-1475:
-

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

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

+1 tests included.  The patch appears to include 10 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 passed core unit tests.

+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/1041//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HDFS-Build/1041//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1041//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-2.patch, 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




[jira] Commented: (HDFS-1475) Want a -d flag in hadoop dfs -ls : Do not expand directories

2010-10-22 Thread Aaron T. Myers (JIRA)

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

Aaron T. Myers commented on HDFS-1475:
--

+1

This would be extremely useful. For that matter, this would allow one to see 
the permissions, etc of the root directory, which presently I know of no way to 
view, aside from the OIV. :)

> 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.20.1
> Environment: any
>Reporter: Greg Connor
>Priority: Minor
>
> 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.
-
You can reply to this email to add a comment to the issue online.