SET spark.driver.memory=32G;
SET spark.executor.memory=16G;
SET spark.dynamicAllocation.minExecutors=100;
shuffle fetch wait
shuffle fetch wait time is:xxx ms greater than max wait 1800000 ms, throw exception
原因: shuffle超时. 作业认为shuffle卡住, 故报错退出
解决方案: 如果作业shuffle时间不超过1800s, 请直接重试. 否则可以调整spark.shuffle.maxFetchWaitTime参数, 提高阈值(默认1800s).
SET spark.shuffle.maxFetchWaitTime=7200s
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError: Unable to acquire 516 bytes of memory, got 0
原因:内存不足
跑样本的时候,把spark的executor核数设置的大一点,跑着跑着会出现java oom的报错。用核数为2跑就可以。
第一个是8个核公用20G内存
第二个是2个核公用14个内存
在每个核上,内存少了
是executor的内存
--conf spark.shuffle.manager=SORT
--conf spark.yarn.executor.memoryOverhead=4096
--conf spark.network.timeout=3600
--conf spark.akka.frameSize=1024
--conf spark.driver.maxResultSize=2048
--conf spark.default.parallelism=5000
--conf spark.shuffle.service.enabled=true
--conf spark.shuffle.service.port=7337
--conf spark.shuffle.maxFetchWaitTime=3600s
--conf spark.rdd.compress=true
--conf spark.memory.fraction=0.6
--conf spark.sql.shuffle.partitions=20000