Support Questions

Find answers, ask questions, and share your expertise

Hadoop Installation Directory

avatar
Contributor

Hello, Assume i have a given system where hadoop is installed.

And if someone ask me to give the directory path where hadoop is installed , how to get this ?

Also in my VM installation i could not see even HADOOP_HOME environment variable.

Can we give any name to our hadoop home environment variable ???

3 REPLIES 3

avatar
Master Guru

One example:

[root@sandbox ~]# find / -name hadoop
/usr/bin/hadoop
[..]


[root@sandbox ~]# ls -lrt /usr/bin/hadoop
lrwxrwxrwx 1 root root 41 2015-10-27 12:29 /usr/bin/hadoop -> /usr/hdp/current/hadoop-client/bin/hadoop

Here /usr/hdp/current/hadoop-client/bin/ will be your Hadoop home

HADOOP_HOME is not a global variable, it is used by Hadoop daemons from hadoop env file.

avatar
Master Mentor

@Tabrez Basha Syed

Hadoop or HDP will be installed under /usr/hdp/version and symlink /usr/hdp/current

[root@phdns01 hdp]# ls -l

total 12

drwxr-xr-x. 25 root root 4096 Feb 22 00:33 2.3.4.0-3485

drwxr-xr-x. 2 root root 4096 Feb 14 19:35 current

drwxr-xr-x. 3 root root 4096 Feb 16 08:46 share

root@phdns01 current]# ls -l

total 0

lrwxrwxrwx. 1 root root 30 Feb 14 19:35 accumulo-client -> /usr/hdp/2.3.4.0-3485/accumulo

lrwxrwxrwx. 1 root root 30 Feb 14 19:35 accumulo-gc -> /usr/hdp/2.3.4.0-3485/accumulo

lrwxrwxrwx. 1 root root 30 Feb 14 19:35 accumulo-master -> /usr/hdp/2.3.4.0-3485/accumulo

lrwxrwxrwx. 1 root root 30 Feb 14 19:35 accumulo-monitor -> /usr/hdp/2.3.4.0-3485/accumulo

lrwxrwxrwx. 1 root root 30 Feb 14 19:35 accumulo-tablet -> /usr/hdp/2.3.4.0-3485/accumulo

lrwxrwxrwx. 1 root root 30 Feb 14 19:35 accumulo-tracer -> /usr/hdp/2.3.4.0-3485/accumulo

lrwxrwxrwx. 1 root root 27 Feb 14 19:35 atlas-server -> /usr/hdp/2.3.4.0-3485/atlas

lrwxrwxrwx. 1 root root 28 Feb 14 19:35 falcon-client -> /usr/hdp/2.3.4.0-3485/falcon

lrwxrwxrwx. 1 root root 28 Feb 14 19:35 falcon-server -> /usr/hdp/2.3.4.0-3485/falcon

lrwxrwxrwx. 1 root root 27 Feb 14 19:35 flume-server -> /usr/hdp/2.3.4.0-3485/flume

lrwxrwxrwx. 1 root root 28 Feb 14 19:35 hadoop-client -> /usr/hdp/2.3.4.0-3485/hadoop

lrwxrwxrwx. 1 root root 33 Feb 14 19:35 hadoop-hdfs-client -> /usr/hdp/2.3.4.0-3485/hadoop-hdfs

[root@phdns01 current]# ls -l /usr/bin/hadoop

lrwxrwxrwx. 1 root root 41 Nov 19 11:19 /usr/bin/hadoop -> /usr/hdp/current/hadoop-client/bin/hadoop

[root@phdns01 current]#

[root@phdns01 current]# echo $HADOOP_HOME

/usr/hdp/current/hadoop-client/

[root@phdns01 current]#

avatar
Master Guru