How to set up a hive storage path?

I changed this part

<property>
  <name>hive.metastore.warehouse.dir</name>
  <value>/user/hive/warehouse</value>
  <description>location of default database for the warehouse</description>
</property>

of hive-default.xml.templatewith my own path. When starting the hive, if I try to create a table, it says that it can create the file: // mypath / etc .. and it is still looking /user/hive/warehouse. Did I do something wrong? I tried creating hive-site.xml and it does not work either.

+4
source share
2 answers

Change the repository path in hive-site.xml as follows:

<property>
  <name>hive.metastore.warehouse.dir</name>
  <value>Your_Path_HERE</value>
  <description>location of default database for the warehouse</description>
</property>

Give permission to the directory <Your_Path_HERE>if it is on the local system

sudo chown -R user <Your_Path_HERE>
sudo chmod -R 777 <Your_Path_HERE>

if the given path is on HDFS, then stop and start hadoop services

stop-all.sh
start-all.sh
+4
source

You specified the property in hive-site.xml:

<property>
  <name>hive.metastore.warehouse.dir</name>
  <value>/user/hivestore/warehouse </value>
</property>

, , hive-shell.

, , , , / , .

0

All Articles