spark内存溢出

spark执行任务时出现java.lang.OutOfMemoryError: GC overhead limit exceeded和java.lang.OutOfMemoryError: java heap space

最直接的解决方式就是在spark-env.sh中将下面两个参数调节的尽量大

    export SPARK_EXECUTOR_MEMORY=2g
    export SPARK_DRIVER_MEMORY=3g

注意,此两个参数设置需要注意大小顺序:

    SPARK_EXECUTOR_MEMORY < SPARK_DRIVER_MEMORY< yarn集群中每个nodemanager内存大小

 

参考文章:http://my.oschina.net/mkh/blog/330386

猜你喜欢

转载自pumbaa-he.iteye.com/blog/2310123