Can not list/access files of local system from hadoop

0 votes

I have some files in this path /home/user/local-base/

I am trying to list the files in this directory using the following command:

hdfs dfs -ls /home/user/local-base/

But I am getting this error:

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable ls: `/home/user/local-base/': No such file or directory

The path exists:

$ pwd

/home/user/local-base/
Dec 12, 2018 in Big Data Hadoop by digger
• 27,620 points
53 views

1 answer to this question.

0 votes

You can not directory use files from your local directory. Try this:

hdfs dfs -mkdir /user
hdfs dfs -mkdir /user/local-base
hdfs dfs -ls /user/local-base
echo "Hello World" > file01
hadoop fs -copyFromLocal /user/local-base
hadoop fs -cat /user/local-base/file01
answered Dec 12, 2018 by Omkar
• 67,120 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Can I have a list of property files used in Hadoop Framework?

Here is a complete list of configuration ...READ MORE

answered Aug 14, 2018 in Big Data Hadoop by Frankie
• 9,810 points
55 views
0 votes
1 answer

How can I access S3/S3n from a local Hadoop 2.6 installation?

For some reason, the jar hadoop-aws-[version].jar which contains the ...READ MORE

answered Oct 3, 2018 in Big Data Hadoop by digger
• 27,620 points
656 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What does hadoop fs -du command gives as output?

The first value is the size of ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,190 points
642 views
0 votes
1 answer

How can I write text in HDFS using CMD?

Hadoop put & appendToFile only reads standard ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,190 points
63 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,190 points
120 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,190 points
163 views
0 votes
1 answer

Hadoop: How to copy directory from local system to hdfs using Java code?

Just use the FileSystem's copyFromLocalFile method. If the source Path ...READ MORE

answered Nov 14, 2018 in Big Data Hadoop by Omkar
• 67,120 points
317 views
0 votes
4 answers