1

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!!

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
ForeverLearner
  • 1,901
  • 2
  • 28
  • 51

3 Answers3

1

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

ForeverLearner
  • 1,901
  • 2
  • 28
  • 51
0

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

Sartaj Singh Gill
  • 1,074
  • 12
  • 21
0

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.

Ivan Georgiev
  • 1,115
  • 7
  • 11