加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – spark exitCode:12是什么意思?

发布时间:2020-12-16 18:36:58 所属栏目:安全 来源:网络整理
导读:我正在尝试运行一个用 scala 11.8编写的spark应用程序,在EMR集群版本5.3.0上使用spark 2.1. 我使用以下json配置了集群: [ { "Classification": "hadoop-env","Configurations": [ { "Classification": "export","Configurations": [],"Properties": { "JAVA
我正在尝试运行一个用 scala 11.8编写的spark应用程序,在EMR集群版本5.3.0上使用spark 2.1.
我使用以下json配置了集群:

[
  {
    "Classification": "hadoop-env","Configurations": [
        {
            "Classification": "export","Configurations": [],"Properties": {
                "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
            }
        }
    ],"Properties": {}
  },{
    "Classification": "spark-env","Properties": {}
  }
]

如果我试图在客户端模式下运行一切运行正常.尝试使用群集模式运行应用程序时,它失败,状态码为12.

这是主日志的一部分,我在其中看到状态代码:

17/02/01 10:08:26 INFO TaskSetManager: Finished task 79.0 in stage 0.0 (TID 79) in 293 ms on ip-10-234-174-231.us-west-2.compute.internal (executor 2) (78/11102)
17/02/01 10:08:27 INFO YarnAllocator: Driver requested a total number of 19290 executor(s).
17/02/01 10:08:27 INFO ApplicationMaster: Final app status: FAILED,exitCode: 12,(reason: Exception was thrown 1 time(s) from Reporter thread.)
17/02/01 10:08:27 INFO SparkContext: Invoking stop() from shutdown hook

更新:

作为工作的一部分,我需要从s3中读取一些数据,
这样的事情:
sc.textFile(“s3n:// stambucket / impressions / * / 2017-01-0 [1-9] / * / impression_recdate *)
如果我只花一天时间,就没有错误.
但是9我得到了这12个退出代码.甚至更奇怪的是考虑到在客户端模式下运行9天的事实就好了.

解决方法

退出代码12是标准的 exit code in linux,用于指示内存不足.

Spark将每个执行程序进程使用的默认内存量设置为1gb.无论群集节点/主机上的可用内存量如何,EMR都不会覆盖此值.一种可能的解决方法是将maximizeResourceAllocation标志设置为true.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读