Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-11053

AuxService should not use class name as default system classes

    XMLWordPrintableJSON

Details

    Description

      Following Apache Spark document to configure Spark Shuffle Service as YARN AuxService,
      https://spark.apache.org/docs/3.2.0/running-on-yarn.html#running-multiple-versions-of-the-spark-shuffle-service
       

        <property>
          <name>yarn.nodemanager.aux-services</name>
          <value>spark_shuffle</value>
        </property>
        <property>
          <name>yarn.nodemanager.aux-services.spark_shuffle.classpath</name>
          <value>/opt/apache/spark/yarn/*</value>
        </property>
        <property>
          <name>yarn.nodemanager.aux-services.spark_shuffle.class&lt;/name>
          <value>org.apache.spark.network.yarn.YarnShuffleService</value>
        </property> 

       but failed with exception

      2021-12-02 15:34:00,886 INFO util.ApplicationClassLoader: classpath: [file:/opt/apache/spark/yarn/spark-3.2.0-yarn-shuffle.jar]
      2021-12-02 15:34:00,886 INFO util.ApplicationClassLoader: system classes: [org.apache.spark.network.yarn.YarnShuffleService]
      2021-12-02 15:34:00,887 INFO service.AbstractService: Service org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices failed in state INITED
      org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.lang.ClassNotFoundException: org.apache.spark.network.yarn.YarnShuffleService
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices.initAuxService(AuxServices.java:482)
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices.serviceInit(AuxServices.java:761)
              at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
              at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:109)
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl.serviceInit(ContainerManagerImpl.java:327)
              at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
              at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:109)
              at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:494)
              at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
              at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:962)
              at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:1042)
      Caused by: java.lang.ClassNotFoundException: org.apache.spark.network.yarn.YarnShuffleService
              at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
              at org.apache.hadoop.util.ApplicationClassLoader.loadClass(ApplicationClassLoader.java:189)
              at org.apache.hadoop.util.ApplicationClassLoader.loadClass(ApplicationClassLoader.java:157)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:348)
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxiliaryServiceWithCustomClassLoader.getInstance(AuxiliaryServiceWithCustomClassLoader.java:165)
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices.createAuxServiceFromLocalClasspath(AuxServices.java:242)
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices.createAuxService(AuxServices.java:271)
              at org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices.initAuxService(AuxServices.java:452)
              ... 10 more
      

      A workaround is adding

      <property>
          <name>yarn.nodemanager.aux-services.spark_shuffle.system-classes</name>
          <value>not.existed.class&amp;amp;lt;/value>
       </property>

       

      Attachments

        Issue Links

          Activity

            People

              chengpan Cheng Pan
              chengpan Cheng Pan
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 50m
                  50m