Vivek Harry
Vivek Harry

Reputation: 439

Hive cannot create roles and show roles in cloudera?

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

Upvotes: 0

Views: 3151

Answers (1)

Aditya Lolla
Aditya Lolla

Reputation: 31

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

Upvotes: 1

Related Questions