Cannot find overlay setting: $ HADOOP_HOME must be installed or hasoop must be in the path

So, a little background. I tried to configure Hive on a CentOS 6 machine. I followed the instructions of this Youtube video: http://www.youtube.com/watch?v=L2lSrHsRpOI

In my case, I use Hadoop-1.1.2 and Hive 0.9.0, all directories marked as "mnt" in this video, I replaced it with "opt" because where all my hadoop and hive packages were open.

As soon as I got to the part of the video where I had to start Hive through "./hive", this error appeared:

"Cannot find hadoop installation: $HADOOP_HOME must be set or hadoop must be in the path" 

I think one of the questions I have is in which directory do I need to edit the .profile file? because I donโ€™t understand why we should go to the "home" directory for this change. And also, if that helps, this is what I wrote in the .profile file in the my / home / hadoop directory

 export HADOOP_HOME=/opt/hadoop/hadoop export HIVE_HOME=/opt/hadoop/hive export PATH=$HADOOP_HOME/bin:$HIVE_HOME/bin 

Thank you very much!

+4
source share
1 answer

Go to the /etc/profile.d directory and create the hadoop.sh file with

 export HADOOP_HOME=/opt/hadoop/hadoop export HIVE_HOME=/opt/hadoop/hive export PATH=$PATH:$HADOOP_HOME/bin:$HIVE_HOME/bin 

After saving the file, make sure that

 chmod +x /etc/profile.d/hadoop.sh source /etc/profile.d/hadoop.sh 

That should take care of this.

+2
source

Source: https://habr.com/ru/post/1491739/


All Articles