Reply
Highlighted
Explorer
Posts: 12
Registered: ‎08-10-2015

Unble to create tables through beeline after enabling sentry

Hi am getting the below error while creating database using beeling after enabling sentry. Request to guide me what need to be done after enabling sentry (CDH 5.4.7) like creating any users that have privilages to create databases, tables,roles etc..

 

0: jdbc:hive2://10.25.21.68:10000> create database newtest;
Error: Error while compiling statement: FAILED: SemanticException No valid privileges
Required privileges for this query: Server=server1->action=*; (state=42000,code=40000)
0: jdbc:hive2://10.25.21.68:10000>

Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: Unble to create tables through beeline after enabling sentry

On a freshly configured Sentry+Hive configuration, login as "hive" user and issue "CREATE ROLE admin;", followed with "GRANT ALL ON SERVER server1 TO ROLE admin;" and "GRANT ROLE admin TO GROUP hive;".

Now you can act as an admin as the "hive" user. After this, grant your users roles and access rights as you prefer. See examples at bottom of http://www.cloudera.com/documentation/enterprise/latest/topics/sg_hive_sql.html#concept_c5d_11p_r4_u... to get a grip on how to do that.
Explorer
Posts: 17
Registered: ‎09-17-2016

Re: Unble to create tables through beeline

Hi.. I am getting an error while creating database. 

0: jdbc:hive2://localhost:10000> create database zza;

Error: Error while compiling statement: FAILED: ParseException line 2:0 missing EOF at 'create' near 'databases' (state=42000,code=40000)