Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hive 配置单元创建角色并授予对有限表的访问权限_Hive_Grant - Fatal编程技术网

Hive 配置单元创建角色并授予对有限表的访问权限

Hive 配置单元创建角色并授予对有限表的访问权限,hive,grant,Hive,Grant,我已经创建了一个配置单元数据库HR,它有3个表person、dept、contact。我有两个HR用户-ad1和us1。ad1管理员us1用户。我希望us1只访问联系人表,而不访问其他内容。我在蜂箱里怎么做? 这就是我所尝试的: 1) Logged into Hive as ad1 2) Executed set hive.security.authorization.enabled=true; 3) create role r1 4) grant select on table contact

我已经创建了一个配置单元数据库HR,它有3个表person、dept、contact。我有两个HR用户-ad1和us1。ad1管理员us1用户。我希望us1只访问联系人表,而不访问其他内容。我在蜂箱里怎么做? 这就是我所尝试的:

1) Logged into Hive as ad1
2) Executed set hive.security.authorization.enabled=true;
3) create role r1
4) grant select on table contact to role r1;
5) grant role r1 to user us_1
现在,当我以us_1身份登录到Hive时,我仍然能够查询所有表


我做错了什么

在配置单元中处理安全性的方法是通过Unix POSIX。保护配置单元存储数据的unix文件夹,这样您就可以确保访问安全