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.

Not able to create temp function in hive in hdp2.6.1

Not able to create temp function in hive in hdp2.6.1

Guru

We were able to create temp function in hive earlier before upgrade but once we upgraded to 2.6.1 then it stopped working and getting following permission error. Please note that user has all the privileges to hdfs.

0: jdbc:hive2://server.com:844> add jar hdfs://server.com:8020/product_dataquality/product_dq_work/jars/brickhouse-0.7.1-SNAPSHOT.jar;

INFO : converting to local hdfs://server.com:8020/product_dataquality/product_dq_work/jars/brickhouse-0.7.1-SNAPSHOT.jar

INFO : Added [/tmp/2255f7a7-735c-49fc-aac4-9d7914c41612_resources/brickhouse-0.7.1-SNAPSHOT.jar] to class path

INFO : Added resources: [hdfs://server.com:8020/product_dataquality/product_dq_work/jars/brickhouse-0.7.1-SNAPSHOT.jar]

No rows affected (0.36 seconds)

0: jdbc:hive2://server.com:844> create temporary function collect12 as 'brickhouse.udf.collect.CollectUDAF';

Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [saurkuma] does not have [CREATE] privilege on [collect12] (state=42000,code=40000)

5 REPLIES 5
Highlighted

Re: Not able to create temp function in hive in hdp2.6.1

Guru

following is HS2 logs :

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo} span.s1 {font-variant-ligatures: no-common-ligatures} span.Apple-tab-span {white-space:pre}

2017-06-29 02:38:32,162 ERROR [HiveServer2-HttpHandler-Pool: Thread-93]: ql.Driver (SessionState.java:printError(993)) - FAILED: HiveAccessControlException Permission denied: user [saurkuma] does not have [CREATE] privilege on [collect12]

org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAccessControlException: Permission denied: user [saurkuma] does not have [CREATE] privilege on [collect12]

at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.checkPrivileges(RangerHiveAuthorizer.java:417)

at org.apache.hadoop.hive.ql.Driver.doAuthorizationV2(Driver.java:856)

at org.apache.hadoop.hive.ql.Driver.doAuthorization(Driver.java:644)

Highlighted

Re: Not able to create temp function in hive in hdp2.6.1

Super Mentor

@Saurabh

I see that you are using Ranger:

org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.checkPrivileges

It might be related to:

https://issues.apache.org/jira/browse/RANGER-1631

.

Highlighted

Re: Not able to create temp function in hive in hdp2.6.1

Super Mentor

@Saurabh

As a temporary workaround you might want to try allowing users to create temporary UDFs by creating a Ranger policy something like following:

Resource: Database=*, udf=*
Permissions: Create
Users/Groups: xxxxxxxxxxxxxxxxxx

.

Highlighted

Re: Not able to create temp function in hive in hdp2.6.1

Guru

Yes @Jay SenSharma I also feel that we are facing this bug.

Highlighted

Re: Not able to create temp function in hive in hdp2.6.1

Guru

@Jay SenSharma: I tried the same but still getting same error. Did you check whether this workaround works for hdp2.6.1 ?

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