HIVE与sentry权限控制
HDFS

HUE

IMPALA

HIVE
1.使用beeline连接HiveServer2,并登录hive用户
beeline
!connect jdbc:hive2://你的主机名:10000 hive hive
2.创建bigdata角色
create role bigdata;
3.为角色赋予超级权限
grant all on server server1 to role admin;
grant select on server server1 to role bigdata;
grant select on server server1 to role impala;
grant create on server server1 to role bigdata;
4.将角色授权给各个用户组
grant role admin to group hive; --hive用户组有admin权限
grant role impala to group impala;--impala用户组有查询权限
grant role bigdata to group bigdata;--bigdata用户组有查询和创建权限。
这样之后在Hue中新建用户和组bigdata,新建用户和组hive。各自分配好Hue的访问权限,如bigdata可访问impala和hive
hive为管理员权限,这样bigdata登录Hue就不怕误删hive中非bigdata所建的表了;
Hue机器上记得添加新用户bigdata 所属组为bigdata

HUE

IMPALA

HIVE
1.使用beeline连接HiveServer2,并登录hive用户
beeline
!connect jdbc:hive2://你的主机名:10000 hive hive
2.创建bigdata角色
create role bigdata;
3.为角色赋予超级权限
grant all on server server1 to role admin;
grant select on server server1 to role bigdata;
grant select on server server1 to role impala;
grant create on server server1 to role bigdata;
4.将角色授权给各个用户组
grant role admin to group hive; --hive用户组有admin权限
grant role impala to group impala;--impala用户组有查询权限
grant role bigdata to group bigdata;--bigdata用户组有查询和创建权限。
这样之后在Hue中新建用户和组bigdata,新建用户和组hive。各自分配好Hue的访问权限,如bigdata可访问impala和hive
hive为管理员权限,这样bigdata登录Hue就不怕误删hive中非bigdata所建的表了;
Hue机器上记得添加新用户bigdata 所属组为bigdata