详细报错: ERROR SparkContext: Error initializing SparkContext. org.apache.spark.SparkException: Dynamic allocation of executors requires the external shuffle service. You may enable this through spark.shuffle.service.enabled. ... ERROR ApplicationMaster: User class threw exception: org.apache.spark.SparkException: Dynamic allocation of executors requires the external shuffle service. You may enable this through spark.shuffle.service.enabled. org.apache.spark.SparkException: Dynamic allocation of executors requires the external shuffle service. You may enable this through spark.shuffle.service.enabled.
将spark.shuffle.service.enabled 设置为true 即可
spark.shuffle.service.enabled=true