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,240 points
281 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

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,240 points
1,051 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
665 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
369 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
• 67,120 points
129 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 in Big Data Hadoop by ravikiran
• 3,560 points
24 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 in Big Data Hadoop by ravikiran
• 3,560 points
14 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
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
40 views