Spark-yarn以错误exitCode = 16结束,如何解决?

时间:2017-01-25 09:28:11

标签: apache-spark yarn

我正在使用Apache Spark 2.0.0和Apache Hadoop 2.6.0。我正在尝试在我的hadoop集群上运行我的spark应用程序。

我使用了命令行:

bin/spark-submit --class org.JavaWordCount \
    --master yarn \
    --deploy-mode cluster \
    --driver-memory 512m \
    --queue default \
    /opt/JavaWordCount.jar  \
    10

但是,Yarn结束时出现错误 exictCode = 16

17/01/25 11:05:49 INFO impl.ContainerManagementProtocolProxy: yarn.client.max-cached-nodemanagers-proxies : 0
17/01/25 11:05:49 INFO impl.ContainerManagementProtocolProxy: Opening proxy : hmaster:59600
17/01/25 11:05:49 ERROR yarn.ApplicationMaster: RECEIVED SIGNAL TERM
17/01/25 11:05:49 INFO yarn.ApplicationMaster: Final app status: FAILED, exitCode: 16, (reason: Shutdown hook called before final status was reported.)
17/01/25 11:05:49 INFO storage.DiskBlockManager: Shutdown hook called

我尝试使用此here来解决此问题,但它没有给出实际的答案。

有谁知道如何解决这个问题?

提前致谢

1 个答案:

答案 0 :(得分:2)

刚遇到这个问题。 JVM正在使用过多的内存。尝试添加属性

  <property>
    <name>yarn.nodemanager.vmem-check-enabled</name>
    <value>false</value>
  </property>

在所有nodemanagers的yarn-site.xml中并重新启动。它对我有用

参考:https://issues.apache.org/jira/browse/YARN-4714