Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # dev >> Hadoop fs -ls behaviour compared to native ls


Copy link to this message
-
Hadoop fs -ls behaviour compared to native ls
Hi,

hadoop fs -ls dirname

lists entries like

dirname/file1
dirname/file2

i.e. dirname is repeated. And it takes a small second to realize that
there's actually no directory called dirname under dirname.

Native ls doesn't repeat dirname when listing the output.

I suppose the current behaviour is to handle globbing. So,

hadoop fs -ls dirname*

will list

dirname1/file1
dirname2/file1

which makes a little more sense. In contrast, native ls will list the same as

dirname1:
file1

dirname2:
file1

Is there a rationale to keep this as the listing behaviour in Hadoop ?
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB