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.

Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Highlighted

Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Expert Contributor

For coming out of this statement, it taking 3 mint, it taking lot of time to complete ?if this table grant already exist getting below error

hive>set role admin;
hive>grant select on table database.tablename to role role1with grant option; 
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Error granting privileges: null
5 REPLIES 5
Highlighted

Re: Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Super Mentor

@zkfs

Please check the output of the following:

$ hive -e 'set -v;' > set_v.out
$ hive -e 'show grant on all;' > grant_all.out
$ hive -e 'show current roles;' > grant_current_`echo $UESR`.out 

Post HDP 2.2.4 where SQL Authorization is disabled for Hive Cli. Which HDP release are you using?

Try using Beeline to see if there is any difference.

[1] https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Authorization#LanguageManualAuthoriz...

[2] https://community.hortonworks.com/articles/4568/sql-based-authorization-in-hive.html

.

Highlighted

Re: Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Super Mentor

@zkfs

Additionally as you mentioned that the grant is taking lots of time.

If you see granting is taking little longer then you can try setting the following values to lower limits as following:
hive.metastore.client.connect.retry.delay=1s
hive.metastore.failure.retries=3 

.

Highlighted

Re: Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Expert Contributor

thanks for your reply, is there patch fix is available or highter version its been fixed.

currently we using 2.3 HDP version.

Highlighted

Re: Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Super Mentor

@zkfs It's more of a tuning issue, Doe not look like a bug.

Highlighted

Re: Grant Select if exist getting error,FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Expert Contributor

thanks for your reply

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