Zhihua Deng created SENTRY-2559: ----------------------------------- Summary: DefaultSentryValidator: Use session's specified classloader to load the udf class instead Key: SENTRY-2559 URL: https://issues.apache.org/jira/browse/SENTRY-2559 Project: Sentry Issue Type: Improvement Components: Hive V2 Affects Versions: 1.7.1 Reporter: Zhihua Deng
When hive creating functions, a ClassNotFoundException may be thrown if the corresponding external jar is added to the session: Caused by: org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException: Error retrieving udf class at org.apache.sentry.binding.hive.v2.authorizer.DefaultSentryValidator.addExtendHierarchy(DefaultSentryValidator.java:321) at org.apache.sentry.binding.hive.v2.authorizer.DefaultSentryValidator.checkPrivileges(DefaultSentryValidator.java:181) ... 23 more Caused by: java.lang.ClassNotFoundException: com.xxx.IP2Address at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.sentry.binding.hive.v2.authorizer.DefaultSentryValidator.addExtendHierarchy(DefaultSentryValidator.java:305) Use session's specified classloader to load the udf class instead -- This message was sent by Atlassian Jira (v8.3.4#803005)