Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

hdfs - Hadoop 2.2 Installation `.' no such file or directory

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://abhishek-pc:8042/
http://abhishek-pc:50070/
http://abhishek-pc:8088/

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Well, your problem regarding ls: '.': No such file or directory' is because, there is no home dir on HDFS for your current user. Try

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

Then you will be able to hadoop fs -ls

As per this warning WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable, please see my answer at this question


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...