2017-10-19 30 views
0

我有一個火花應用程序。它會多次加入某個表並將結果寫入HDFS。在什麼情況下,一個階段中的所有任務都在同一執行器中執行

我提交腳本:

spark-submit \ 
--master yarn \ 
--deploy-mode cluster \ 
--driver-memory 14G \ 
--driver-cores 6 \ 
--executor-memory 14G \ 
--executor-cores 4 \ 
--num-executors 50 \ 
--conf spark.sql.autoBroadcastJoinThreshold=31457280 \ 
--conf spark.sql.shuffle.partitions=200 \ 
--class my.main.class\ 
my.jar 

問題: 火花WebUI中,我喜歡各個階段在同一exector執行: all executor 爲什麼在階段200個任務在同一執行PC上執行-xxxx269? enter image description here

+0

你從哪裏讀取源? –

+0

從hdfs讀取所有表格 – fifth

+0

您是否在HDFS集羣上運行Spark? –

回答

0

可能它可能發生在兩種方式 1。沒有適用的分區 2。如果你使用的是分區哈希,所有的鍵哈希值足夠接近

+0

感謝@Guda我使用Hash分區。但是如果密鑰哈希值足夠接近,它應該是skew.just就像:task1 extcute 1G數據和task2-200什麼也不執行。 – fifth

相關問題