Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-3859 Tez JDK9 Support
  3. TEZ-3860

JDK9: ReflectionUtils may not use URLClassLoader

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0, 0.9.3
    • None
    • None

    Description

      The following code
      https://github.com/apache/tez/blob/master/tez-api/src/main/java/org/apache/tez/common/ReflectionUtils.java#L125

      is not compatible with JDK9 since the classloader is an AppClassLoader

      causes exceptions like this:

      java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
      	at org.apache.tez.common.ReflectionUtils.addResourcesToSystemClassLoader(ReflectionUtils.java:125) ~[tez-api-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.utils.RelocalizationUtils.addUrlsToClassPath(RelocalizationUtils.java:57) ~[tez-common-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.app.dag.impl.DAGImpl$StartTransition.transition(DAGImpl.java:1793) ~[tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.app.dag.impl.DAGImpl$StartTransition.transition(DAGImpl.java:1776) ~[tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.hadoop.yarn.state.StateMachineFactory$SingleInternalArc.doTransition(StateMachineFactory.java:362) ~[hadoop-yarn-common-2.8.1.jar:?]
      	at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:302) ~[hadoop-yarn-common-2.8.1.jar:?]
      	at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:46) ~[hadoop-yarn-common-2.8.1.jar:?]
      	at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:448) ~[hadoop-yarn-common-2.8.1.jar:?]
      	at org.apache.tez.state.StateMachineTez.doTransition(StateMachineTez.java:59) ~[tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.app.dag.impl.DAGImpl.handle(DAGImpl.java:1156) [tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.app.dag.impl.DAGImpl.handle(DAGImpl.java:147) [tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.app.DAGAppMaster$DagEventDispatcher.handle(DAGAppMaster.java:2251) [tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.tez.dag.app.DAGAppMaster$DagEventDispatcher.handle(DAGAppMaster.java:2242) [tez-dag-0.9.0.jar:0.9.0]
      	at org.apache.tez.common.AsyncDispatcher.dispatch(AsyncDispatcher.java:180) [tez-common-0.9.0.jar:0.9.0]
      	at org.apache.tez.common.AsyncDispatcher$1.run(AsyncDispatcher.java:115) [tez-common-0.9.0.jar:0.9.0]
      	at java.base/java.lang.Thread.run(Thread.java:844) [?:?]
      

      Attachments

        1. TEZ-3860.03.patch
          7 kB
          László Bodor
        2. TEZ-3860.02.patch
          7 kB
          László Bodor
        3. TEZ-3860.01.patch
          5 kB
          László Bodor

        Issue Links

          Activity

            People

              abstractdog László Bodor
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m