0
votes

While formatting namenode by executing the command " bin/hadoop namenode -format " i get this error:

hduser@ubuntu:~/hadoop/bin$ ./hadoop namenode -format DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.

Error : Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode

3
Do you export HADOOP_HOME correctly in your ~/.bashrc?Masoud Sagharichian

3 Answers

1
votes

try removing all hadoop temp data rm -Rf /app/hadoop/tmp/* then try again formatting

0
votes

It means that you should not use hadoop namenode -format but hdfs namenode -format instead, since it has been deprecated.

0
votes

Does it work?

 ~/hadoop/bin/hdfs namenode -format