Apache Spark 學習紀錄
  • Introduction
  • Spark architecture
    • spark架構圖
  • Launch a Spark program
    • Spark-submit
    • Spark-shell
    • pyspark
  • RDD
  • DataFrame
  • SparkSQL
  • Spark Streaming
  • 性能調校
Powered by GitBook
On this page

Was this helpful?

  1. Spark architecture

spark架構圖

PreviousSpark architectureNextLaunch a Spark program

Last updated 5 years ago

Was this helpful?

這是官方所提供的架構圖,在Spark 的架構中主要分為幾個角色

  1. Driver : 在這個階段我們會建立 SparkContext 的物件 ,用以溝通 Cluster 以及Worker。

  2. Cluster Manager : 我們執行 spark job 的時候要獲取資源的索要對象,可以是 Yarn 、Mesos 或是 Local。

  3. Worker : 管理工作的單位,每個 Worker 管理多個 Executor ,也跟 Cluster Manager 溝通資源

  4. Executor : 執行工作的單位,所執行的工作也就是圖中的 Task,並與 Driver 溝通工作項目

  5. Partition : 工作單位,每個 Task 會存放在一個 Partition 裡頭,有多少個 partition 就可以理論上同時做幾個 task,當然實際上真正的同時做要看有幾個 CPU 囉。