• 02_Spark Application不同模式下的监控


    监控Spark Application的运行

    官方文档: http://spark.apache.org/docs/latest/monitoring.html

    1.1 监控方式

    Driver Programme WEB UI (Port: 4040)

    * 每一个driver program (更具体的说应该是SparkContext) 都会启动1个web UI,  http://<driver-node>:4040
    * 通过web ui能够看到这个特定的Spark Application的如下内容,如果1台机器上运行了多个SparkContext,那么端口将从4040持续增长(4040/4041/4042...)
      - stages,tasks
      - summary of RDD size and memeory usage
      - 环境信息
      - running executor的信息
    【注意】默认情况下Driver Programme WEB UI只能在Application运行期间提供服务

    Spark UI (Port:8080)

    集群模式下运行的Spark,Master节点(cluster manager)会启动一个Spark UI,用于监控Spark Application的各个阶段, http://<master>:8080

    Standalone模式提交的Application
    * Standalone模式的cluster manager(Spark Master节点上运行)会启动一个Web UI,Spark UI(8080),显示正在运行及结束的Spark Application
    * Spark UI上的Applicaiton detail会跳转到Driver Program Web UI(4040), 因此Application运行结束后,application detail默认就无法查看

    Yarn UI(8088)

    yan client,yan clustert提交的Spark Application, 都会在Yarn UI上列出(yarn上运行的application,类型为spark)
    区别:
    yarn client:     提交Spark Application的终端, 打印详细信息及最终结果,Yarn UI上观测该Application的运行状态
    yarn cluster:   提交Spark Application的终端,打印application的提交,运行,结束信息,Yarn UI观测该Application的运行状态,最终结果在worker的stdout日志中打印

    1.2  提交方式,监控方式总结

    提交模式 提交脚本 监控页面及结果查看
    local本地模式提交 # ./bin/run-example SparkPi 10 --master local[2] 

    监控: http://本地ip:4040  (Driver program Web UI)

    注意:Application运行期间Driver Program Web UI才可用

    结果: 提交Application的终端(打印详细信息)

    standalone模式提交

    # ./bin/spark-submit
    --class org.apache.spark.examples.SparkPi
    --master spark://host01:7077
    ./lib/spark-examples-1.6.0-hadoop2.6.0.jar
    100

     

    监控: http://master ip:8080 (Master节点上的cluster manager启动的web ui)

    历史监控:页面会显示standalone模式提交的已完成的application

    结果:提交Application的终端(打印详细信息)

    yarn-client模式提交

    # ./bin/spark-submit
    --class org.apache.spark.examples.SparkPi
    --master yarn
    --deploy-mode client
    ./lib/spark-examples-1.6.0-hadoop2.6.0.jar
    100

     

    监控: http://ResourceManager:8088 (Yarn RM启动的web ui)

    历史监控:页面会显示已完成的application

    结果:提交Application的终端(会打印详细信息)

    yarn-cluster模式提交

    # ./bin/spark-submit
    --class org.apache.spark.examples.SparkPi
    --master yarn
    --deploy-mode cluster
    ./lib/spark-examples-1.6.0-hadoop2.6.0.jar
    100

     

    监控: http://ResourceManager:8088 (Yarn RM启动的web ui)

    历史监控:页面会显示已完成的application

    结果:通过监控页面,跳转到worker node, worker node的stdout日志中打印(终端只打印Application的运行状态,accepted, running,finished)

  • 相关阅读:
    莎士比亚的对白
    拟人、比喻及修辞 —— 生动的英语
    拟人、比喻及修辞 —— 生动的英语
    32位与64位、单精度(single-precision)与双精度(double-precision)
    32位与64位、单精度(single-precision)与双精度(double-precision)
    OpenGL(十七) 绘制折线图、柱状图、饼图
    计算机的组成 —— PCI(PCIE)、PCB
    计算机的组成 —— PCI(PCIE)、PCB
    ios 打电话结束返回到应用中
    paip.输入法编程----删除双字词简拼
  • 原文地址:https://www.cnblogs.com/shay-zhangjin/p/8068864.html
Copyright © 2020-2023  润新知