Spark 处理完后的DataFrame写入pgsql时报错: 通过查看分区数,发现分区在100~500之间,因此写入时repation至10个分区,后来报错如下: 最终调小 --num-executors 6解决。