Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-2559

DefaultSentryValidator: Use session's specified classloader to load the udf class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 1.7.1
    • None
    • Hive V2
    • None

    Description

      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

      Attachments

        1. SENTRY-2559.001.patch
          2 kB
          Zhihua Deng

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dengzh Zhihua Deng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: