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,310 points
2,791 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,630 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
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,310 points
3,808 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
3,349 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
1,502 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,040 points
552 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,600 points
2,520 views
0 votes
1 answer

Unable to Locate WinUtils Library in Hadoop binary path.

If you are facing this problem while running a ...READ MORE

answered Jul 11, 2019 in Big Data Hadoop by ravikiran
• 4,600 points
327 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,630 points
141 views