Hive cannot create roles and show roles in cloudera?

3.1k Views Asked by At

I'm getting the error, once i given the command show roles; in the hive terminal. Kindly do help me, and i add some property in hive-site.xml.

I am working in cloudera-quickstart-5.4.2.0-vmware.

<property>
<name>hive.security.authorization.enabled</name>
<value>true</value>
<description>enable or disable the hive client     authorization</description>
</property>

<property>
<name>hive.security.authorization.createtable.owner.grants</name>
<value>ALL</value>
<description>the privileges automatically granted to the owner whenever a table gets created. 
An example like "select,drop" will grant select and drop privilege to the owner of the table</description>
</property>

[cloudera@quickstart ~]$ hive

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.4.2.jar!/hive-log4j.properties
WARNING: Hive CLI is deprecated and migration to Beeline is recommended.
hive> show roles;
FAILED: SemanticException The current builtin authorization in Hive is incomplete and disabled.

I am waiting for the answers. Thanks in Advance

1

There are 1 best solutions below

0
Aditya Lolla On

Command like these will not work in the Hive Shell, you have to move to Beeline. Which is the CLI for HiveServer2.

Use this string for beeline connect: !connect jdbc:hive2://localhost:10000/ (Replace the localhost with the FQDN of the hive server) Once you are in the beeline shell.

show roles; show current roles;

Will give you your desired outputs