sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SENTRY-1046) Hive Auxiliary JARs Directory is not working when Sentry is enabled: Caused by: java.lang.ClassNotFoundException
Date Tue, 02 Feb 2016 22:36:39 GMT
Anne Yu created SENTRY-1046:
-------------------------------

             Summary: Hive Auxiliary JARs Directory is not working when Sentry is enabled:
Caused by: java.lang.ClassNotFoundException
                 Key: SENTRY-1046
                 URL: https://issues.apache.org/jira/browse/SENTRY-1046
             Project: Sentry
          Issue Type: Bug
          Components: Sentry
    Affects Versions: 1.7.0
            Reporter: Anne Yu
             Fix For: 1.7.0


Per this [doc|http://www.cloudera.com/documentation/enterprise/5-4-x/topics/cm_mc_hive_udf.html#concept_ry3_vrm_2r_unique_1],
User-Defined Functions (UDFs) with HiveServer2 Using Cloudera Manager: 

1. configured Hive's "hive.aux.jars.path" as "/data"; 
2. copy jar file to HDFS "/data/add10-jdk1.7.jar";
3. grant all on uri "hdfs:///data/add10-jdk1.7.jar" to test_role;
4.  CREATE TEMPORARY FUNCTION add10func AS 'com.cloudera.itest.hiveserver2.udf.Add10' using
jar 'hdfs:///data/add10-jdk1.7.jar';

Got error: Error: Error while compiling statement: FAILED: SemanticException Error retrieving
udf class:com.cloudera.itest.hiveserver2.udf.Add10 (state=42000,code=40000)

stack trace:
{noformat}
Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Error retrieving udf class:com.cloudera.itest.hiveserver2.udf.Add10
        at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:247)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:441)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:307)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1170)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1157)
        at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:124)
        ... 15 more
Caused by: java.lang.ClassNotFoundException: com.cloudera.itest.hiveserver2.udf.Add10
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:234)
{noformat}

This feature worked before [SENTRY-1003|https://issues.apache.org/jira/browse/SENTRY-1003].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message