hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Williams (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10971) Flag to make `hadoop fs -ls` print filenames only
Date Fri, 15 Aug 2014 18:13:20 GMT

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

Ryan Williams commented on HADOOP-10971:

Interesting suggestion; if keeping the default and adding the flag allowed for sooner release,
I'd lean towards going that route; it's not that big of a deal to have different semantics
between hadoop- and non-hadoop-{{ls}}.

Also, adding {{-C}} could be viewed as the first step towards a world where {{-l}} and {{-C}}
both exist, in which world the default could be changed less disruptively, since people would
be able to get either format before and after the incompatible change.

In any case, I'd prefer to focus on the (relatively simpler) {{-C}} addition here first, but
that's just my $0.02.

> Flag to make `hadoop fs -ls` print filenames only
> -------------------------------------------------
>                 Key: HADOOP-10971
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10971
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 2.3.0
>            Reporter: Ryan Williams
> It would be useful to have a flag that made {{hadoop fs -ls}} only print filenames, instead
of full {{stat}} info. The "{{-C}}" flag from GNU {{ls}} is the closest analog to this behavior
that I've found, so I propose that as the flag.
> Per [this stackoverflow answer|http://stackoverflow.com/a/21574829], I've reluctantly
added a {{hadoop-ls-C}} wrapper that expands to {{hadoop fs -ls "$@" | sed 1d | perl -wlne'print
+(split " ",$_,8)\[7\]'}} to a few projects I've worked on, and it would obviously be nice
to have hadoop save me (and others) from such hackery.

This message was sent by Atlassian JIRA

View raw message