1. 설정 (hiveserver2-site.xml)
<configuration>
<property>
<name>hive.server2.enable.doAs</name>
<value>true</value>
</property>
<property>
<name>hive.users.in.admin.role</name>
<value>root</value>
</property>
<property>
<name>hive.security.metastore.authorization.manager</name>
<value>org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly</value>
</property>
<property>
<name>hive.security.authorization.enabled</name>
<value>true</value>
</property>
<property>
<name>hive.security.authorization.manager</name><value>org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory</value>
</property>
<property>
<name>hive.security.authenticator.manager</name><value>org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value></value>
</property>
</configuration>
$HIVE_HOME/ bin/hive --service metastore &
$HIVE_HOME/ bin/hive --service hiveserver2 &
2. command
show roles;
create role rolename;
drop role rolename;
show current roles;
set role rolename;
set role all;
drop role all;
GRANT rolename1 [, rolename2, ...] TO principal_spec1 [,principal_spec2, . . .][ WITH ADMIN OPTION ];
REVOKE [ADMIN OPTION FOR] rolename1 [, rolename2, ...] FROM principal_spec1 [,principal_spec2, . . .];
show role grant user | role name;
show principals rolename;
GRANT privilege_type [, privilege_type, ...] ON table_or_view_name TO principal_spec [, principal_spec, ...][WITH GRANT OPTION];
REVOKE [GRANT OPTION FOR] privilege_type [, privilege_type, ...] ON table_or_view_name FROM principal_spec [, principal_spec, ...];
show grant user | role name on all | table_or_view_name
'NoSQL > Hive' 카테고리의 다른 글
hive avro table 자동적재 using sqoop (0) | 2016.11.11 |
---|---|
Hive authentification (0) | 2016.10.16 |
Hive DML (0) | 2016.10.15 |
Hive DDL (0) | 2016.10.15 |
Hive Tuning (0) | 2016.06.27 |