我修改了这部分
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
<description>location of default database for the warehouse</description>
</property>
hive-default.xml.template
的和我自己的路径。运行配置单元时,如果我尝试创建一个表,它表示它可以创建file:// mypath / etc ..它仍在寻找/user/hive/warehouse
。我做错什么了吗?我试图创建hive-site.xml,它似乎也不起作用。
答案 0 :(得分:5)
更改 hive-site.xml 中的仓库路径,如下所示:
<property>
<name>hive.metastore.warehouse.dir</name>
<value>Your_Path_HERE</value>
<description>location of default database for the warehouse</description>
</property>
如果<Your_Path_HERE>
目录位于本地系统
sudo chown -R user <Your_Path_HERE>
sudo chmod -R 777 <Your_Path_HERE>
如果给定路径在HDFS上,则停止并启动hadoop服务
stop-all.sh
start-all.sh
答案 1 :(得分:0)
您已在hive-site.xml
中指定了该属性:
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hivestore/warehouse </value>
</property>
一旦修改,请尝试通过退出并启动hive-shell重新加载配置单元shell。
此外,请确保使用配置单元的每个人都具有相应的读/写权限到上述属性中指定的目录。