hive 不同用户 权限设置 出错处理

今天安装了hive

在a账号安装的,一切正常

但是到其他账户下,报错

>show tables;

Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

以为是权限问题

查看log

Nested Throwables StackTrace:
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.

后来的解决方案:一个老外的方案:


 


I had the same issue and resolved it by the following way. The issue is because of two possible reasons.

  • Either, the user you logged in as (do 'whoami' ) does not havewrite access to the derby metastore database directory used by Hive.So, go to /var/lib/hive/metastore/metastore_db (this is the defaultin most cases) and verify if your user id has permissions by doing anls. In case your userid does not have permissions, you should ask the owner of the directory to grant write permissions to you. So,login as the owner/the super user and execute

cd /var/lib/hive/metastore/metastore_db

chmod a+rwx . --recursive

Be warned that this will give permissions to all users. Tweak r-w-x bits accordingly though.

  • The other possible reason is that derby is a single user database. So, please clear the lock files by going to

cd /var/lib/hive/metastore/metastore_db

rm *.lck

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值