Hadoop hdfs unable to locate file -
im trying copy file hdfs using below command. filename googlebooks-eng.... etc....
when try list file within hdfs don't see filename being listed.what actual filename?
hadoop-user@hadoop-desk:~/hadoop$ bin/hadoop dfs -put /home/hadoop-user/googlebooks-eng-all-1gram-20120701-0 /user/prema hadoop-user@hadoop-desk:~/hadoop$ bin/hadoop dfs -ls /user/prema found 1 items -rw-r--r-- 1 hadoop-user supergroup 192403080 2014-11-19 02:43 /user/prema
almost hadoop dfs utilies follows unix style. syntax of hadoop dfs -put
hadoop dfs -put <source_file> <destination>
. here destination can directory or file. in case /user directory exists directory prema doesn't exist, when copy files local hdfs prema used name of file. googlebooks-eng-all-1gram-20120701-0
, /user/prema
same file.
if wanted persist file name. need delete existing file , create new directory /user/prema before copying;
bin/hadoop dfs -rm /user/prema; bin/hadoop dfs -mkdir /user/prema; bin/hadoop dfs -put /home/hadoop-user/googlebooks-eng-all-1gram-20120701-0 /user/prema
now should able see file inside hdfs directory /user/prema
bin/hadoop dfs -rm /user/prema
Comments
Post a Comment