Unable to format namenode. Main class not found - Updated the previous question with latest screenshots



0

Error stack trace is as below

hadoop@hadoop:/usr/local/hadoop/etc/hadoop$ hdfs namenode -format
Error: Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode

Have verified the configuration files too.

The error is consistent but multiple tries of installation of new VMs.

All the configuration find and bash file screen shots are attached.

Have also tried with core=site.xml having fs.default.name as the property instead of fs.defaultFS.

 



2 Answer(s)


0

Issue seems to be the missing Hadoop_home variable not being set. 

The document shared needs to be updated


0

As Apache hadoop not officially support Ubuntu Desktop version 16.04. This issue comes often.

It was a problem with following things which you need to check:

1. Ubuntu 16 (latest version)
2. Java was not updated
3. HADOOP_HOME, HADOOP_PREFIX were pointed towards old hadoop directory path which requires an update
4. CLASSPATH was not updated
 
Hope this helps.
 
Thanks.

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password