Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce, mail # user - does "fs -put " create subdirectories?


Copy link to this message
-
Re: does "fs -put " create subdirectories?
Jean-Marc Spaggiari 2013-01-16, 16:58
Yes it does, you can just try ;)

hadoop@node3:~/hadoop-1.0.3$ bin/hadoop fs -ls /user/
Found 1 items
drwxr-xr-x   - hbase supergroup          0 2013-01-03 09:54 /user/hbase

hadoop@node3:~/hadoop-1.0.3$ bin/hadoop fs -put CHANGES.txt
/user/test/CHANGES.txt

hadoop@node3:~/hadoop-1.0.3$ bin/hadoop fs -ls /user/
Found 2 items
drwxr-xr-x   - hbase  supergroup          0 2013-01-03 09:54 /user/hbase
drwxr-xr-x   - hadoop supergroup          0 2013-01-16 11:56 /user/test

hadoop@node3:~/hadoop-1.0.3$ bin/hadoop fs -ls /user/test/
Found 1 items
-rw-r--r--   3 hadoop supergroup     446615 2013-01-16 11:56
/user/test/CHANGES.txt

hadoop@node3:~/hadoop-1.0.3$ bin/hadoop fs -put CHANGES.txt
/user/test2/subdir/anotherone/CHANGES.txt

hadoop@node3:~/hadoop-1.0.3$ bin/hadoop fs -ls /user/test2/subdir/anotherone/
Found 1 items
-rw-r--r--   3 hadoop supergroup     446615 2013-01-16 11:58
/user/test2/subdir/anotherone/CHANGES.txt
2013/1/16, John Meza <[EMAIL PROTECTED]>:
> Does "hadoop fs -put mmddyyyy.tsv t1/2012/01/01/mmddyyyy.tsv" create the
> necassary subdirectories in hdfs?thanksJohn