Hadoop home path

+1 vote

I am trying to run the below java code on a hadoop server.

javac -classpath ${HADOOP_HOME}/hadoop-${HADOOP_VERSION}-core.jar -d wordcount_classes WordCount.java

but I am not able to locate {HADOOP_HOME}. I tried with hadoop -classpath but it is giving output as below:

/etc/hadoop/conf:/usr/lib/hadoop/lib/*:/usr/lib/hadoop/.//*:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/usr/lib/hadoop-hdfs/.//*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-0.20-mapreduce/./:/usr/lib/hadoop-0.20-mapreduce/lib/*:/usr/lib/hadoop-0.20-mapreduce/.//*

Mar 26, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,411 views

1 answer to this question.

0 votes
you can manually input the hadoop home path in the .bashrc file and make sure the same path is there in all these files (coresite, env.sh, hdfssite and yarnsite, mapred)
answered Mar 26, 2018 by Ashish
• 2,650 points
export HADOOP_HOME=/usr/lib/hadoop-2.7.3
export HADOOP_CONF_DIR=/usr/lib/hadoop-2.7.3/etc/hadoop
export HADOOP_MAPRED_HOME=/usr/lib/hadoop-2.7.3
export HADOOP_COMMON_HOME=/usr/lib/hadoop-2.7.3
export HADOOP_HDFS_HOME=/usr/lib/hadoop-2.7.3
export YARN_HOME=/usr/lib/hadoop-2.7.3
export PATH=$PATH:/usr/lib/hadoop-2.7.3/bin


export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_151
export PATH=$JAVA_HOME/bin:$PATH

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,140 points
3,154 views
0 votes
1 answer

Hadoop absolute path - pwd ?

"hdfs dfs -pwd" does not exist because ...READ MORE

answered Mar 27, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
5,471 views
0 votes
2 answers

Hadoop error: Input path does not exist

I was able to fix the issue. ...READ MORE

answered Jan 12, 2019 in Big Data Hadoop by Ponezhil Ramu
6,003 views
0 votes
1 answer

How to get absolute path of files in a directory in Hadoop?

You can use HDFS API like the ...READ MORE

answered Dec 4, 2018 in Big Data Hadoop by Frankie
• 9,810 points
2,533 views
–1 vote
1 answer

IDE Eclipse: Failed to locate the winutils binary in the hadoop binary path

Try this: First, click on file import appliance. Now ...READ MORE

answered Dec 31, 2018 in Big Data Hadoop by Omkar
• 69,110 points
837 views
0 votes
1 answer
0 votes
1 answer

Error: Failed to locate WinUtils binary in the Hadoop Binary Path

I will redirect you to a link ...READ MORE

answered Jun 20, 2019 in Big Data Hadoop by ravikiran
• 4,620 points
5,005 views
0 votes
1 answer
0 votes
1 answer

Testing methods used by a Hadoop developer ?

As such, there is no exact way ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by Ashish
• 2,650 points
222 views