-1

I have started hadoop namenode and datanode.But I can't to create directory when I execute the "hadoop fs -mkdir -p /user/root/test".

It have told me "19/08/01 14:34:49 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable".

What should I do?Thanks!

1 Answers1

-1

Have you added HADOOP_HOME in your ~/.bashrc file? Is $HADOOP_HOME/bin in your path? If not then add the following two lines in the ~/.bashrc file. Change the fullPathToFolderWhereHadoopResides with the folder where hadoop is.

export HADOOP_HOME=/fullPathToFolderWhereHadoopResides
export PATH=$HADOOP_HOME/bin:$PATH

All the best.

Amit
  • 2,018
  • 1
  • 8
  • 12
  • Operate like my teacher,I have added Hadoop environment variable in /etc/profile file. – ShuangHong.Liu Aug 01 '19 at 07:04
  • Ok great. Your teacher must have given you full instructions. Just to make sure ... what are the output of these? Do you see Hadoop folders there? "echo $PATH" and "echo $HADOOP_HOME"? – Amit Aug 01 '19 at 07:13
  • I tried to query in BaiDu.A blog have told me "Glibc's version is low." Then I tried to use yum tool to install the Glibc. Then I tried to use "hadoop fs" . Command was executed correctly.But It's still tell me that message."WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable" – ShuangHong.Liu Aug 01 '19 at 10:53
  • Execuse me! Could it be that its current version is too low? – ShuangHong.Liu Aug 01 '19 at 10:59
  • Could I get your Facebook? – ShuangHong.Liu Aug 01 '19 at 11:02
  • See this answer why got the Warning if you are concerned about it ! https://stackoverflow.com/questions/19943766/hadoop-unable-to-load-native-hadoop-library-for-your-platform-warning – Kris Aug 01 '19 at 11:08
  • I think I have already known this reason.Thank you very much! – ShuangHong.Liu Aug 01 '19 at 11:30