Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unble to create tables through beeline after enabling sentry

Unble to create tables through beeline after enabling sentry

Explorer

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>

2 REPLIES 2

Re: Unble to create tables through beeline after enabling sentry

Master Guru
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.
Highlighted

Re: Unble to create tables through beeline

Contributor

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)

Don't have an account?
Coming from Hortonworks? Activate your account here