【问题标题】:Unable to see Spark UI when I submit in yarn-cluster of Hadoop-2.6当我在 Hadoop-2.6 的 yarn-cluster 中提交时看不到 Spark UI
【发布时间】:2016-04-25 22:45:26
【问题描述】:

我正在远程使用带有 8 个节点的集群的 Apache Spark 1.6。我在主节点上使用 spark-submit 提交作业,如下所示:

hastimal@hadoop-8:/usr/local/spark$ ./bin/spark-submit --class  umkc.graph.SparkRdfCcCount  --master yarn-cluster  --num-executors 7 --executor-memory 52g --executor-cores 7 --driver-memory 52g --conf spark.default.parallelism=49 --conf spark.driver.maxResultSize=4g  --conf spark.yarn.executor.memoryOverhead=4608 --conf spark.yarn.driver.memoryOverhead=4608 --conf spark.akka.frameSize=1200 --conf spark.network.timeout=300  --conf spark.io.compression.codec=lz4 --conf spark.rdd.compress=true --conf spark.eventLog.enabled=true --conf spark.eventLog.dir=hdfs://128.110.152.54:9000/SparkHistory --conf spark.broadcast.compress=true --conf spark.shuffle.spill.compress=true --conf spark.shuffle.compress=true --conf spark.shuffle.manager=sort /users/hastimal/SparkProcessing.jar /inputRDF/data-793-805.nt

一切都很好。我得到的输出没有任何错误,但是当我去查看 Spark UI 时它没有显示。在我的 Spark Scala 代码中,我是这样写的:

val conf = new SparkConf().setAppName("Spark Processing").set("spark.ui.port","4041")

在完成了包括thisthis 在内的几件事之后,我解决了与HDFS 中的权限和写入相关的问题。当我运行 spark-submit 并在 Yarn 中看到日志时,它显示如下:

16/04/25 16:34:23 INFO server.AbstractConnector: Started SelectChannelConnector@0.0.0.0:4041
16/04/25 16:34:23 INFO util.Utils: Successfully started service 'SparkUI' on port 4041.
16/04/25 16:34:23 INFO ui.SparkUI: Started SparkUI at http://128.110.152.131:4041
16/04/25 16:34:23 INFO cluster.YarnClusterScheduler: Created YarnClusterScheduler
16/04/25 16:34:24 INFO util.Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 41216.
16/04/25 16:34:24 INFO netty.NettyBlockTransferService: Server created on 41216
16/04/25 16:34:24 INFO storage.BlockManagerMaster: Trying to register BlockManager
16/04/25 16:34:24 INFO storage.BlockManagerMasterEndpoint: Registering block manager 128.110.152.131:41216 with 34.4 GB RAM, BlockManagerId(driver, 128.110.152.131, 41216)
16/04/25 16:34:24 INFO storage.BlockManagerMaster: Registered BlockManager

这意味着 Spark UI 已在 http://128.110.152.131:4041 上启动,这又是数据节点之一,当我转到该 URL 时,它显示如下所示的拒绝错误:

仅供参考:所有使用的端口并在所有机器上打开。请帮我。我想查看我的 Spark Job 的 DAG。我可以通过 Yarn UI 查看所有纱线应用程序。我可以使用端口 8088 看到如下应用程序 UI: 。我希望看到带有 DAG 的 Spark UI,就像我们在独立或使用 IntelliJ IDE 时看到的那样。

【问题讨论】:

    标签: scala apache-spark hadoop-yarn hadoop2 spark-graphx


    【解决方案1】:

    在 yarn 模式下,应用程序主创建 spark UI。在作业运行时转到资源管理器并单击 ApplicationMaster,您将看到 UI。

    【讨论】:

    • 谢谢,但我可以看到使用 8088 端口,但我不是在谈论这个。我想看到 Spark UI,我们可以在其中看到 DAG,就像我们在本地独立或使用 localhost:4040 在 IDE 中运行时看到的那样。请参阅我编辑得更清楚。
    • Application master 启动 spark UI。如果您单击 ResourceManager 作业页面上的 ApplicationMaster 链接。它会带你到 sparkUI。
    • 谢谢@vgunnu。我做到了,它显示与128.110.152.131:404 相同。我的意思是与上图 1 相同的错误。无论是使用您的方法还是使用128.110.152.131:4041,它都会显示相同的错误。看起来像路由到同一页面但拒绝连接.....
    • 节点上有多少个接口?登录节点,使用 netstat 或 lsof 查看在哪个接口上打开了哪些端口。
    猜你喜欢
    • 2018-04-06
    • 1970-01-01
    • 2018-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-16
    • 2022-01-26
    • 2016-01-18
    相关资源
    最近更新 更多