Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (11.4k points)

I have installed Hadoop and HDFS using this tutorial

http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html

Everything is fine.

I am also able to create directories and use them using

hadoop fs -mkdir /tmp

hadoop fs -mkdir /small

I can also say

hadoop fs -ls /

However I am following a tutorial in which the trainer does

hadoop fs -mkdir temp

hadoop fs -ls

now on my machine when I issue the above command it says

ls: `.': No such file or directory

In my training video the command hadoop fs -ls works perfectly. Why should I specify the "/"?

Also I am getting this warning in all my commands

13/12/28 20:23:52 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

But in my trainers video there is no such warning.

My configuration file is exactly as the tutorial above and I can also see all management UIs at

http://aarav-pc:8042/

http://aarav-pc:50070/

http://aarav-pc:8088/

So my question is what is wrong with my configuration and why is my system behaving differently than the training video?

1 Answer

0 votes
by (32.3k points)
edited by

Well, your problem regarding ls: '.': No such file or directory' is because there is no home dir on HDFS for your current user. First, create directory, then use “ls”.

hadoop fs -mkdir -p /user/[current login user]

Then you will be able to execute:

hadoop fs -ls

And to overcome the warning:

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable


Please see this answer.

If you want to know more about Hadoop, then do check out this awesome video tutorial:

Browse Categories

...