【问题标题】:Cannot submit Spark app to cluster, stuck on "UNDEFINED"无法将 Spark 应用程序提交到集群,卡在“未定义”状态
【发布时间】:2015-02-18 00:14:32
【问题描述】:

我使用此命令将 spark 应用程序 提升到 yarn 集群

export YARN_CONF_DIR=conf
bin/spark-submit --class "Mining"
  --master yarn-cluster
  --executor-memory 512m ./target/scala-2.10/mining-assembly-0.1.jar

在 Web UI 中卡住了 UNDEFINED

在控制台中,它卡在了

<code>14/11/12 16:37:55 INFO yarn.Client: Application report from ASM: 
     application identifier: application_1415704754709_0017
     appId: 17
     clientToAMToken: null
     appDiagnostics: 
     appMasterHost: example.com
     appQueue: default
     appMasterRpcPort: 0
     appStartTime: 1415784586000
     yarnAppState: RUNNING
     distributedFinalState: UNDEFINED
     appTrackingUrl: http://example.com:8088/proxy/application_1415704754709_0017/
     appUser: rain
</code>

更新:

在 Web UI http://example.com:8042/node/containerlogs/container_1415704754709_0017_01_000001/rain/stderr/?start=0 中深入了解 Logs for container,我发现了这个

14/11/12 02:11:47 WARN YarnClusterScheduler: Initial job has not accepted 
any resources; check your cluster UI to ensure that workers are registered
and have sufficient memory
14/11/12 02:11:47 DEBUG Client: IPC Client (1211012646) connection to
spark.mvs.vn/192.168.64.142:8030 from rain sending #24418
14/11/12 02:11:47 DEBUG Client: IPC Client (1211012646) connection to
spark.mvs.vn/192.168.64.142:8030 from rain got value #24418

我发现这个问题在这里有解决方案http://hortonworks.com/hadoop-tutorial/using-apache-spark-hdp/

The Hadoop cluster must have sufficient memory for the request.

For example, submitting the following job with 1GB memory allocated for
executor and Spark driver fails with the above error in the HDP 2.1 Sandbox.
Reduce the memory asked for the executor and the Spark driver to 512m and
re-start the cluster.

我正在尝试这个解决方案,希望它能奏效。

【问题讨论】:

    标签: apache-spark


    【解决方案1】:

    解决方案

    终于找到it caused by memory problem

    当我在界面的Web UI中将yarn.nodemanager.resource.memory-mb更改为3072(其值为2048)并重新启动集群时,它起作用了。

    我很高兴看到这个

    yarn nodemanager 有 3GB,我的峰会是

    bin/spark-submit
        --class "Mining"
        --master yarn-cluster
        --executor-memory 512m
        --driver-memory 512m
        --num-executors 2
        --executor-cores 1
        ./target/scala-2.10/mining-assembly-0.1.jar`
    

    【讨论】:

    • 是的,这肯定是内存问题。但是,您增加了可用于容器的整体内存。我注意到您只为驱动程序和执行程序(x 2)请求了 512m。这仍然低于您为 yarn.nodemanager.resource.memory-mb 设置的原始 2048m,还是您在此节点上运行了更多 YARN 应用程序?
    • 不,我确定我没有在这个节点上运行其他应用程序。
    猜你喜欢
    • 2015-10-06
    • 1970-01-01
    • 1970-01-01
    • 2016-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多