ForeverLearner
ForeverLearner

Reputation: 2113

Hortonworks sandbox $HIVE_HOME path

I am back again with a stupid question i think. I downloaded the Hortonworks sandbox and tried :

echo $HIVE_HOME

and nothing. Can someone guide me what the path might be ? In the hive-site.xml i get the below lines:

<property>
  <name>hive.metastore.warehouse.dir</name>
  <value>/apps/hive/warehouse</value>
</property>

But this path doesn't exists on the box. Any help is much appreciated!!

Upvotes: 1

Views: 5711

Answers (3)

Ivan Georgiev
Ivan Georgiev

Reputation: 1185

There are a few ways to find Hive warehouse directory:

  • Check the hive configuration and search for warehouse.dir: cat /etc/hive/conf/hive-site.xml | less To search, inside less type /warehouse.dir (when done, press q to exit less). <property> <name>hive.metastore.warehouse.dir</name> <value>/apps/hive/warehouse</value> </property>

  • Execute the SET Hive QL command. You can run it in Hue (in Amabri switch to Hive view) or in the command line. I will show you how to run it in command line and find the parameter.: [maria_dev@sandbox learn]$ hive -S -e 'SET' 2>/dev/null | grep warehouse.dir hive.metastore.warehouse.dir=/apps/hive/warehouse Because Hive prints a lot of information to the stderr, I added the 2>/dev/null output redirect to supress the stderr output from being written to the console.

Upvotes: 0

Sartaj Singh Gill
Sartaj Singh Gill

Reputation: 1194

Have you tried editing the .bashrc and setting your $HIVE_HOME environment variable?

Try this

sudo gedit ~/.bashrc

Copy and paste the following lines at end of the file

# Set HIVE_HOME export HIVE_HOME="/usr/lib/hive/apache-hive-0.13.0-bin" PATH=$PATH:$HIVE_HOME/bin export PATH

You can look at this page and maybe that will help you further http://doctuts.readthedocs.org/en/latest/hive.html

Upvotes: 0

ForeverLearner
ForeverLearner

Reputation: 2113

Sorry for bothering. The path is :

hadoop fs -ls /apps/hive/warehouse/

    [root@sandbox current]# vi /etc/hive/conf.install/hive-site.xml

Searched for the warehouse path and got /apps/hive/warehouse

Upvotes: 1

Related Questions