解决方式1: val conf = new SparkConf() conf.set("spark.testing.memory","2147480000") 解决方式2: IDE进行 参数设置: -Xmx1024m