简体   繁体   中英

Hadoop hdfs showing ls: `/home/hduser/input/': No such file or directory error

I have installed Hadoop 2.6 on single machine using this tutorial . I am using Ubuntu 12.04 machine and Java version 1.6.0_27.

I have created separate user as hduser for Hadoop operations. I have set HADOOP_HOME envrioment variable's value /usr/local/hadoop where I have extracted the Hadoop distribution.

Now I am following an example . But when I execute the command $HADOOP_HOME/bin/hdfs dfs -ls /home/hduser/input/ it gives following error -

15/01/02 18:32:38 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable ls: `/home/hduser/input/': No such file or directory

Also I have tried command: $HADOOP_HOME/bin/hdfs dfs -mkdir /home/hduser/input/ , but still getting same error.

When I run the command jps it shows -

16023 SecondaryNameNode
16200 ResourceManager
16432 NodeManager
18971 Jps
15503 NameNode

It is not showing any process for JobTracker and TaskTracker .

How can I resolve this error and to start/list the process for JobTracker and TaskTracker ?

You are trying to access you local directory using hdfs. Try following steps:

export PATH=$HADOOP_HOME/bin:$PATH ##Make this entry in your ~/.bashrc file
hdfs dfs -mkdir /user
hdfs dfs -mkdir /user/hduser
hdfs dfs -mkdir /user/hduser/input
hdfs dfs -ls /user/hduser/input
echo "Hello World" > file01
hadoop fs -copyFromLocal /user/hduser/input
hadoop fs -cat /user/hduser/input/file01

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM