You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Daryn Sharp (JIRA)" <ji...@apache.org> on 2011/06/11 00:21:59 UTC

[jira] [Created] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

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


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

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071334#comment-13071334 ] 

Hadoop QA commented on HADOOP-7378:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12487890/HADOOP-7378-2.patch
  against trunk revision 1150987.

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

    +1 tests included.  The patch appears to include 4 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 system test framework.  The patch passed system test framework compile.

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

This message is automatically generated.

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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047643#comment-13047643 ] 

Hadoop QA commented on HADOOP-7378:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12482108/HADOOP-7378.patch
  against trunk revision 1134218.

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

    +1 tests included.  The patch appears to include 4 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 system test framework.  The patch passed system test framework compile.

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

This message is automatically generated.

> 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

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daryn Sharp updated HADOOP-7378:
--------------------------------

    Status: Patch Available  (was: Open)

> 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

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068057#comment-13068057 ] 

Suresh Srinivas commented on HADOOP-7378:
-----------------------------------------

Thanks for the explanation. Please provide updated patch with documentation changes.

> 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

        

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daryn Sharp updated HADOOP-7378:
--------------------------------

    Attachment: HADOOP-7378-5.patch

Merged up, and I've got this thing about things being sorted alphabetically...

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, HADOOP-7378-5.patch, 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071853#comment-13071853 ] 

Hadoop QA commented on HADOOP-7378:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12487995/HADOOP-7378-5.patch
  against trunk revision 1151505.

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

    +1 tests included.  The patch appears to include 4 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 system test framework.  The patch passed system test framework compile.

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

This message is automatically generated.

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, HADOOP-7378-5.patch, 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071822#comment-13071822 ] 

Hadoop QA commented on HADOOP-7378:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12487987/HADOOP-7378-3.patch
  against trunk revision 1151505.

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

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

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

    -1 javac.  The patch appears to cause tar ant target to fail.

    -1 findbugs.  The patch appears to cause Findbugs (version 1.3.9) to fail.

    +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:


    -1 system test framework.  The patch failed system test framework compile.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/769//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/769//console

This message is automatically generated.

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065084#comment-13065084 ] 

Suresh Srinivas commented on HADOOP-7378:
-----------------------------------------

Comments:
# Requires updating src/documentation/content/xdocs/file_system_shell.xml
# Naming dirRecurse to noDirRecurse or treatDirAsFiles captures the spirit of -d flag better. This also avoids negative logic.
# Why do you need to combine setRecurse() with dirRecurse? Can they be left independent of each other and dirRecurse overrides the setRecurse() behavior?
# Can you please add a unit test for -d, -R, -d and -R?


> 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

        

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daryn Sharp updated HADOOP-7378:
--------------------------------

    Attachment: HADOOP-7378.patch

> 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

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065089#comment-13065089 ] 

Suresh Srinivas commented on HADOOP-7378:
-----------------------------------------

Additionally can you add test where -ls -d dir* is checked in the HDFS patch. I suspect this may not work.

> 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071931#comment-13071931 ] 

Hudson commented on HADOOP-7378:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #702 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/702/])
    HADOOP-7378. Add -d option to ls to not expand directories. Contributed by Daryn Sharp.

suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151594
Files : 
* /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/cli/testConf.xml
* /hadoop/common/trunk/common/src/docs/src/documentation/content/xdocs/file_system_shell.xml
* /hadoop/common/trunk/common/CHANGES.txt
* /hadoop/common/trunk/common/src/java/org/apache/hadoop/fs/shell/Ls.java


> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, HADOOP-7378-5.patch, 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071832#comment-13071832 ] 

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

I'll post another patch to save you time.

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071869#comment-13071869 ] 

Suresh Srinivas commented on HADOOP-7378:
-----------------------------------------

Daryn, I had already merged up the patch in version 4 of the patch.

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, HADOOP-7378-5.patch, 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

        

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daryn Sharp updated HADOOP-7378:
--------------------------------

    Attachment: HADOOP-7378-2.patch

updated the docs

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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071872#comment-13071872 ] 

Suresh Srinivas commented on HADOOP-7378:
-----------------------------------------

Got it - you sorted it alphabetically...

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, HADOOP-7378-5.patch, 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

        

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-7378:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I committed the patch. Thank you Daryn.

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, HADOOP-7378-5.patch, 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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071834#comment-13071834 ] 

Hadoop QA commented on HADOOP-7378:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12487990/HADOOP-7378-4.patch
  against trunk revision 1151505.

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

    +1 tests included.  The patch appears to include 4 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.TestCLI

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

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

This message is automatically generated.

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, 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

        

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-7378:
------------------------------------

    Attachment: HADOOP-7378-4.patch

Compiling the patch before uploading it to jira helps :-)

> 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-2.patch, HADOOP-7378-3.patch, HADOOP-7378-4.patch, 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

        

[jira] [Updated] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-7378:
------------------------------------

    Attachment: HADOOP-7378-3.patch

Had to merge this patch with the change from HADOOP-7485. Attaching the merged patch.

+1 for HADOOP-7378-2.patch.

Daryn, can you please double check if I got the merge right.

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

        

[jira] [Commented] (HADOOP-7378) hadoop dfs -ls : Do not expand directories (was HDFS-1475)

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
    [ 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