1.環境
CentOS 7.6
CDH 5.16.1
2.安裝Sentry
1.創建數據庫
create database sentry default character set utf8;
CREATE USER 'sentry'@'%' IDENTIFIED BY 'admin';
GRANT ALL PRIVILEGES ON sentry. * TO 'sentry'@'%' IDENTIFIED BY 'admin';
FLUSH PRIVILEGES;

2.添加Sentry服務
3.通過Sentry配置權限
1.修改Hive下的HiveServer2配置

2.配置Hive的Sentry服務

3.配置HDFS的Sentry,控制用戶訪問的HDFS目錄

4.配置Impala的Sentry

5.配置Hue的Sentry

6.開啟hive服務的testing模式

