What is the entry point of Spark container in YARN cluster mode?

时间:2015-05-12 23:42:12

标签: apache-spark yarn

What is the main entry point of a Spark executor when a Spark job is being run in Yarn cluster mode (for Spark 1.2.0+)?

What I am looking for is the Scala class name for the entry point of an Executor (which will be the process executing one of the tasks on a slave machine).

2 个答案:

答案 0 :(得分:2)

spark-submit --class [FULLY QUALIFIED CLASS NAME]
             --master yarn-cluster
             [JAR_TO_USE]

因此,鉴于上述情况,要使用的类是指定的类,它从给定的jar加载,并在该类中搜索static main方法。

来自SparkSubmit.scala

val mainMethod = mainClass.getMethod("main", new Array[String](0).getClass)

答案 1 :(得分:2)

我认为您所询问的是org.apache.spark.executor.Executororg.apache.spark.executor.Executor$TaskRunnerTaskRunner最终run a task

无论是部署模式(client vs cluster)还是使用的集群管理器,即Hadoop YARN或Spark Standalone或Apache Mesos。