Hello all I try to install hadoop but I have a problem when trying to format data folder with command hdfs namenode -format Error Could not find or load main class Username

+1 vote
I've tried to change the last line from hadoop-env.cmd and writing something else instead "%Username%" but still the same error. Any help, please?
May 22, 2019 in Big Data Hadoop by anonymous
2,709 views

1 answer to this question.

+2 votes

Hey!

The error seems like the problem is in setting a class-path, I would suggest you add the below following in your ~./bashrc

export HADOOP_CLASSPATH=$(hadoop classpath):$HADOOP_CLASSPATH

This should work

answered May 22, 2019 by Gitika
• 65,910 points

Hey I see your answer works for setting up hadoop in unix, but im getting the same error while setting up hadoop in windows, can this be fixed in windows..?

can you please tell the windows cmd verison of this:

export HADOOP_CLASSPATH=$(hadoop classpath):$HADOOP_CLASSPATH

line?

Massive thanks to whoever helps me

Hi@shivz,

You don't have to set this in the Windows system I guess. There may be another reason for this. You can check all the configuration steps from the below link.

https://towardsdatascience.com/installing-hadoop-3-2-1-single-node-cluster-on-windows-10-ac258dd48aef

Related Questions In Big Data Hadoop

0 votes
1 answer

Format HDFS Namenode Error: Could not find or load main class ”-Djava.library.path=.home.hadoop.hadoop-3.2.1.lib.native”

Hi@fwood, According to your configuration, you didn't set ...READ MORE

answered Jun 12, 2020 in Big Data Hadoop by MD
• 95,440 points
10,163 views
+1 vote
1 answer
0 votes
2 answers
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
10,600 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,206 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,740 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,284 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP