Changing the Hive Warehouse Directory

By default the hive warehouse directory is located at  the hdfs location /user/hive/warehouse

If you want to change this location, you can add the following property to hive-site.xml.

Everyone using hive should have appropriate read/write permissions to this warehouse directory.

<property>
   <name>hive.metastore.warehouse.dir</name>
   <value>/user/hivestore/warehouse </value>
   <description>location of the warehouse directory</description>
 </property>

Advertisements

About amalgjose
I am an Electrical Engineer by qualification, now I am working as a Software Engineer. I am very much interested in Electrical, Electronics, Mechanical and now in Software fields. I like exploring things in these fields. I like travelling, long drives and very much addicted to music.

One Response to Changing the Hive Warehouse Directory

  1. Patrick Alexander says:

    I’m modifying /etc/hive/conf.dist/hive-site.xml and still the data in created in warehouse directory !
    any other clue where to change the settings ?

    or is there any option when using sqoop to force the new path ?
    my sqoop command is like this:

    sqoop import –connect “jdbc:sqlserver://10.8.7.209:1433;database=ces_forsythe;username=sa;password=sa” –table users –columns “user_id,name_first,name_last,username” –where “user_id>1000” –target-dir /data/load101 –hive-import –hive-home /data/users/load101 — –schema dbo

    –hive-home /data/users/load101 is doing nothing and at the end the data is still on warehouse folder !

    Thanks in advance 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: