spark-submit 碰到 Spark-submit:System memory 466092032 must be at least 471859200

在利用spark进行分布式计算时,

/home/hadoop/spark/spark-2.4.0-bin-hadoop2.7/bin/spark-submit 
							--master=yarn  
							 ALS.py

以上代码是在centos7,利用spark集群运行ALS.py代码,结果出现报错:
Spark-submit:System memory 466092032 must be at least 471859200 报错,根据提示让设置-deriver-memory
,之后将运行代码更改为`

/home/hadoop/spark/spark-2.4.0-bin-hadoop2.7/bin/spark-submit 
						--master=yarn  
						--deriver-memory=2G  
						ALS.py

结果仍然报相同的错误。
经过摸索,最终通过设置–driver-java-options参数,成功解决问题

/home/hadoop/spark/spark-2.4.0-bin-hadoop2.7/bin/spark-submit 
					--master=yarn 
					--driver-java-options "-Dspark.testing.memory=1073741824" 
					--deploy-mode 
					client  ALS.py

状态栏也显示正确
网页查询结果

你可能感兴趣的:(随笔)