• Spark以yarn方式运行时抛出异常


    Spark以yarn方式运行时抛出异常:

    cluster.YarnClientSchedulerBackend: Yarn application has already exited with state FINISHED!

    解决方案:

    主要是给节点分配的内存少,yarn kill了spark application。

    1.停止hadoop集群

    [root@node06 bin]# stop-all.sh

    2.给yarn-site.xml增加配置:

    <property>
        <name>yarn.nodemanager.pmem-check-enabled</name>
        <value>false</value>
    </property>
    <property>
        <name>yarn.nodemanager.vmem-check-enabled</name>
        <value>false</value>
        <description>Whether virtual memory limits will be enforced for containers</description>
    </property>
    <property>
        <name>yarn.nodemanager.vmem-pmem-ratio</name>
        <value>4</value>
        <description>Ratio between virtual memory to physical memory when setting memory limits for containers</description>
    </property>

    3.将master上将l修改后的yarn-site.xm文件覆盖到各个slaves节点

    [root@node06 hadoop]# scp yarn-site.xml node07:`pwd`
    yarn-site.xml                                                                                                              100% 1565     1.5KB/s   00:00    
    [root@node06 hadoop]# scp yarn-site.xml node08:`pwd`
    yarn-site.xml                                                                                                              100% 1565     1.5KB/s   00:00    
    [root@node06 hadoop]# scp yarn-site.xml node09:`pwd`

    4.重新启动hadoop集群

    [root@node06 hadoop]# start-all.sh

    5.重新向yarn提交spark任务

    [root@node06 bin]# ./spark-submit --master yarn --class org.apache.spark.examples.SparkPi ../lib/spark-examples-1.6.0-hadoop2.6.0.jar 100
  • 相关阅读:
    python 协程
    python中基于descriptor的一些概念
    python remove del pop 的区别
    python 装饰器 和面向切面编程(AOP)
    python yield详解
    Python的列表推导式,字典推导式,集合推导式使用方法
    python 垃圾回收机制
    (5) etcd 介绍、经典适用场景、安装、配置、测试
    grafana 安装配置
    open-falcon 安装配置
  • 原文地址:https://www.cnblogs.com/liuys635/p/11070168.html
Copyright © 2020-2023  润新知