Spark的Cluster模式架构图

一、在Spark的官网文件中,可以看到Spark的Cluster模式架构图,

浏览器输入:https://spark.apache.org/docs/latest/cluster-overview.html

Spark的Cluster模式架构图

(1)DriverProgram 就是程序员设计的Spark程序,在Spark中必须定义SparkContext,它是开发Spark应用程序的入口

(2)SparkContext是通过Cluster Manager管理整个集群,集群中包含多个Worker Node,程序运行时,一个worker启动Driver,其他Worker Node启动Executor负责执行任务

(3)executor是真正执行作业的地方,一个集群包含多个Executor,每个Executor接受Driver的命令执行task,一个Executor可以执行一到多个Task