Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24108

AddToClassPathAction should use TezClassLoader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • None
    • None

    Description

      TEZ-4228 fixes an issue from tez side, which is about to use TezClassLoader instead of the system classloader. However, there are some codepaths, e.g. in hive_log_llap.log which shows that the system class loader is used. As thread context classloaders are inherited, the easier solution is to early-initialize TezClassLoader in LlapDaemon, and let all threads use that as context class loader, so this solution is more like TEZ-4223 for llap daemons.

      2020-09-02T00:18:20,242 ERROR [TezTR-93696_1_1_1_0_0] tez.TezProcessor: java.lang.RuntimeException: Map operator initialization failed
      	at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:351)
      	at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:266)
      	at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
      	at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:381)
      	at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:75)
      	at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:62)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:422)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1682)
      	at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:62)
      	at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:38)
      	at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36)
      	at org.apache.hadoop.hive.llap.daemon.impl.StatsRecordingThreadPool$WrappedCallable.call(StatsRecordingThreadPool.java:118)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.serde2.TestSerDe
      	at org.apache.hadoop.hive.ql.exec.MapOperator.getConvertedOI(MapOperator.java:332)
      	at org.apache.hadoop.hive.ql.exec.MapOperator.setChildren(MapOperator.java:427)
      	at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:288)
      	... 16 more
      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.serde2.TestSerDe
      	at org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializerClass(TableDesc.java:79)
      	at org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializer(TableDesc.java:100)
      	at org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializer(TableDesc.java:95)
      	at org.apache.hadoop.hive.ql.exec.MapOperator.getConvertedOI(MapOperator.java:313)
      	... 18 more
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.serde2.TestSerDe
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializerClass(TableDesc.java:76)
      	... 21 more
      
      

      Attachments

        1. HIVE-24108.02.patch
          3 kB
          László Bodor
        2. HIVE-24108.01.patch
          2 kB
          László Bodor
        3. hive_log_llap.log
          1.41 MB
          László Bodor

        Issue Links

          Activity

            People

              abstractdog László Bodor
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: