0
votes

After setting Hadoop Home path and Prefix path in .bashrc and /etc/profile also im getting the same error - Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the path

If i run the script from crontab im facing this error from hive> prompt its working fine

plz help with the regarding how to solve this

2
how did you set path in your .batchrc file.can u post the command.Sravan K Reddy
export HADOOP_HOME=/opt/hadoop/hadoop export HADOOP_PREFIX=/opt/hadoop/hadoop export HIVE_HOME=/opt/hadoop/hive export PATH=$HIVE_HOME/bin:$PATH this is how i kept my paths in .bashrcuser3853317

2 Answers

0
votes

Set $HADOOP_HOME in $HIVE_HOME/conf/hive-env.sh

0
votes

try loading user bash profile in the script, as below,

. ~/.bash_profile

bash is included in user bash_profile and it will have user specific configurations as well.

see the similar question Hbase commands not working in script executed via crontab