Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Copying file from Local to HDFS

Copying file from Local to HDFS

Contributor

Hi,

 

I am trying to copy the file from local to HDFS. PLease see the commands below. Not sure why its not getting  copied. Does not throw any error as well

 

I had installed 3 machine cluster using Clouder Manager Path B, 1 Master and 2 Slave nodes.

 

 

 [root@gslvm64 Documents]# pwd
/root/Documents
[root@gslvm64 Documents]# ls
LicenseKeys.txt
[root@gslvm64 Documents]# hadoop fs -ls /user/
Found 10 items
drwxrwxrwx - cloudera supergroup 0 2015-09-01 11:12 /user/cloudera
drwxrwxrwx - hdfs supergroup 0 2015-08-31 16:18 /user/hdfs
drwxrwxrwx - mapred hadoop 0 2015-08-27 16:27 /user/history
drwxrwxrwt - hive hive 0 2015-08-27 16:31 /user/hive
drwxrwxrwx - hue hue 0 2015-09-01 15:08 /user/hue
drwxrwxrwx - impala impala 0 2015-08-27 16:31 /user/impala
drwxrwxrwx - oozie oozie 0 2015-08-27 16:33 /user/oozie
drwxrwxrwx - root supergroup 0 2015-09-03 08:58 /user/root
drwxrwxrwx - spark spark 0 2015-08-27 16:29 /user/spark
drwxrwxrwx - sqoop2 sqoop 0 2015-08-27 16:29 /user/sqoop2
[root@gslvm64 Documents]# hadoop fs -ls /user/root
[root@gslvm64 Documents]# hadoop fs -put /root/Documents/LicenseKeys.txt /user/root/
put: file /user/root/LicenseKeys.txt._COPYING_ on client 10.250.8.40.
[root@gslvm64 Documents]# hadoop fs -ls /user/root
[root@gslvm64 Documents]#

 

Any help greatly appreciated.

 

Thanks

Chandra

1 REPLY 1

Re: Copying file from Local to HDFS

Rising Star

Hi Chandra,

I haven't seen this problem before, but here are some suggestions for debugging:

 

1. Your cluster has two slave nodes, what is your dfs.replication setting (it defaults to 3)?

 

2. Check for errors in the log files.

 

3. Use 'whoami' to verify that you are indeed root. Create a brand new file, test.txt. Create a new directory, testdir, in HDFS.

    Are you able to 'put' that file to testdir and verify that it's there? Check the log files for errors if it didn't work.

 

Don't have an account?
Coming from Hortonworks? Activate your account here