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,260 points
158 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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

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,260 points
764 views
0 votes
2 answers

Hadoop error: Input path does not exist

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

answered Jan 12 in Big Data Hadoop by Ponezhil Ramu
400 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,590 points
236 views
0 votes
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
• 65,850 points
88 views
0 votes
1 answer

The file exists before processing with hadoop command

Took session and it got resolved. READ MORE

answered Dec 18, 2017 in Big Data Hadoop by Sudhir
• 1,610 points
38 views
0 votes
1 answer

How to sync Hadoop configuration files to multiple nodes?

For syncing Hadoop configuration files, you have ...READ MORE

answered Jun 21, 2018 in Big Data Hadoop by HackTheCode
108 views
0 votes
10 answers

What is the difference between Mongodb and Hadoop?

Apart from the similarity that they are ...READ MORE

answered Dec 6, 2018 in Big Data Hadoop by Deeraj
1,833 views
0 votes
1 answer

How can I download only hdfs and not hadoop?

No, you cannot download HDFS alone because ...READ MORE

answered Mar 15, 2018 in Big Data Hadoop by nitinrawat895
• 9,070 points
54 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
31 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.