Apache Spark running spark-shell on YARN error

后端 未结 2 1462
时光说笑
时光说笑 2021-02-06 10:37

I downloaded: spark-2.1.0-bin-hadoop2.7.tgz from http://spark.apache.org/downloads.html. I have Hadoop HDFS and YARN started with $ start-dfs.sh and

相关标签:
2条回答
  • 2021-02-06 10:53

    I found the solution from another Stackoverflow question. It was not about configuring Apache Spark, it was about configuring Hadoop YARN:

    Running yarn with spark not working with Java 8

    Make sure your yarn-site.xml, from your Hadoop configuration folder, has these properties:

    <property>
        <name>yarn.nodemanager.pmem-check-enabled</name>
        <value>false</value>
    </property>
    
    <property>
        <name>yarn.nodemanager.vmem-check-enabled</name>
        <value>false</value>
    </property>
    
    0 讨论(0)
  • 2021-02-06 11:09

    I met the same problem with you. When I check the NodeManager log,I find this warn:

    2017-10-26 19:43:21,787 WARN org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl: Container [pid=3820,containerID=container_1509016963775_0001_02_000001] is running beyond virtual memory limits. Current usage: 339.0 MB of 1 GB physical memory used; 2.2 GB of 2.1 GB virtual memory used. Killing container.

    So I set a bigger virtual memory(yarn.nodemanager.vmem-pmem-ratio in yarn-site.xml, which default value is 2.1). Then it really worked.

    0 讨论(0)
提交回复
热议问题