Reputation: 166
How can i get value for environment variable $HIVE_HOME in cloudera-quickstartVM-5.7?
Tried to see the existing environment variables by printenv, It does not exist.
Upvotes: 1
Views: 6083
Reputation: 3849
HIVE_HOME
is set when hive
shell is invoked. here are three ways to find out HIVE_HOME
From hive
commandline:
[cloudera@quickstart ~]$ hive -e '!env'|grep HIVE_HOME
HIVE_HOME=/usr/lib/hive
From hive
shell - this will print same variables as above
but you can't use grep here, so you will have to find HIVE_HOME
from list of all variables:
hive> !env;
From hive
command file itself:
[cloudera@quickstart ~]$ cat /usr/bin/hive|grep HIVE_HOME
export HIVE_HOME=/usr/lib/hive
Upvotes: 9