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>
I hope this tip is useful. Feel free to comment if you have any queries or suggestions.
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 🙂