如何配置Hive仓库路径? [英] How to configure Hive warehouse path?

查看:224
本文介绍了如何配置Hive仓库路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我修改了这部分

<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,但它似乎也不起作用.

of hive-default.xml.template with my own path. When running hive, if I try to create a table it says it could create file://mypath/etc.. and it is still looking for /user/hive/warehouse. Did I do something wrong? I tried to create hive-site.xml, and it does not seem to work either.

推荐答案

hive-site.xml 中更改仓库路径,如下所示:

Change the warehouse 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>

授予<Your_Path_HERE>目录的权限(如果它在本地系统上)

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

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

如果给定路径位于HDFS上,则停止并启动hadoop服务

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

stop-all.sh
start-all.sh

这篇关于如何配置Hive仓库路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆