apache sentry配置单元授予insert特权,但不起作用

sqserrrh  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(366)

将值(1,'lisi')插入到limifang\ U oracle\ U store002(id,name)中;
异常:错误:编译语句时出错:失败:semanticexception org.apache.hadoop.hive.ql.metadata.invalidtableexception:找不到表limifang\u oracle\u store002(state=42000,code=40000)0:jdbc:hive2://192.168.2.16:2181192.168.2.1>插入到liminfang\ u oracle\ u store002(id,name)值(1,'lisi');警告:配置单元2中已弃用mr上的配置单元,在将来的版本中可能不可用。考虑使用不同的执行引擎(即spark、tez)或使用hive1.x版本。错误:org.apache.hive.service.cli.hivesqlexception:处理语句时出错:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.mapredtask返回代码1。权限被拒绝:user=kaif1,access=execute,inode=“/tmp/hadoop/staging/kaif1/.staging”:root:supergroup:drwx------
权限信息如下:显示授权角色kaif1;
|数据库|表|分区|列|主体|名称|主体|类型|权限|授予|选项|授予|时间|授予者|
|ziy|u db|u 109|liminfang|u oracle|u store002 | kaif1 | role | delete | false 1242296989000
|ziy|u db|u 109|liminfang|u oracle|u store002 | kaif1 | role | insert | false | 1022295356000 |

ds97pgxw

ds97pgxw1#

检查这些组中的hadoop集群hdfs,如果有hadoop、hdfs、supergroup和其他组。
首先在linux系统中建立相应的用户测试组和超群组(hadoop或hdfs组)。
2将测试用户添加到超级组(或hadoop、hdfs组)。
3将配置单元与配置单元用户(管理员)直线连接,创建角色:test\u role,执行命令:create role test\u role;
4授予测试角色的权限并执行命令:grant all on testdb。testtable到role test\u role(必须有一个库testdb,表testtable in his)
5将test\u role角色分配给测试用户执行命令:grant test\u role to group test;
验证使用testuser beeline连接hive:use testdb;显示表格;检查是否错误。

相关问题