2017-05-03 46 views
2

我的火花工作是由oozie在色相submmited。火花以纱线簇模式运行。我想监视所谓的驾驶者的4040端口运行的应用程序的状态,但我找不到4040端口,我检查过程:如何找到我的Spark的驱动程序节点?

appuser 137872 137870 0 18:55 ? 00:00:00 /bin/bash -c /home/jdk/bin/java -server -Xmx4096m -Djava.io.tmpdir=/data6/data/hadoop/tmp/usercache/appuser/appcache/application_1493800575189_0547/container_1493800575189_0547_01_000004/tmp '-Dspark.driver.port=36503' '-Dspark.ui.port=0' -Dspark.yarn.app.container.log.dir=/home/log/hadoop/logs/userlogs/application_1493800575189_0547/container_1493800575189_0547_01_000004 -XX:OnOutOfMemoryError='kill %p' org.apache.spark.executor.CoarseGrainedExecutorBackend --driver-url spark://[email protected]:36503 --executor-id 3 --hostname 10.120.117.100 --cores 1 --app-id application_1493800575189_0547 --user-class-path file:/data6/data/hadoop/tmp/usercache/appuser/appcache/application_1493800575189_0547/container_1493800575189_0547_01_000004/__app__.jar 1> /home/log/hadoop/logs/userlogs/application_1493800575189_0547/container_1493800575189_0547_01_000004/stdout 2> /home/log/hadoop/logs/userlogs/application_1493800575189_0547/container_1493800575189_0547_01_000004/stderr 
appuser 138337 137872 99 18:55 ? 00:05:11 /home/jdk/bin/java -server -Xmx4096m -Djava.io.tmpdir=/data6/data/hadoop/tmp/usercache/appuser/appcache/application_1493800575189_0547/container_1493800575189_0547_01_000004/tmp -Dspark.driver.port=36503 -Dspark.ui.port=0 -Dspark.yarn.app.container.log.dir=/home/log/hadoop/logs/userlogs/application_1493800575189_0547/container_1493800575189_0547_01_000004 -XX:OnOutOfMemoryError=kill %p org.apache.spark.executor.CoarseGrainedExecutorBackend --driver-url spark://[email protected]:36503 --executor-id 3 --hostname 10.120.117.100 --cores 1 --app-id application_1493800575189_0547 --user-class-path file:/data6/data/hadoop/tmp/usercache/appuser/appcache/application_1493800575189_0547/container_1493800575189_0547_01_000004/__app__.jar 

我不知道为什么spark.ui.port是0而不是4040.当然,我的linux系统不允许使用端口0。所以,我无法从REST api监视应用程序状态。

有人可以给我一些建议吗?


从马里乌什答案十分感谢,是下面的火花ApplicationMaster过程?

[[email protected] bin]$ ps -ef|grep ApplicationMaster 
appuser 125805 125803 0 May03 ?  00:00:00 /bin/bash -c /home/jdk/bin/java -server -Xmx1024m -Djava.io.tmpdir=/data6/data/hadoop/tmp/usercache/appuser/appcache/application_1493800575189_0014/container_1493800575189_0014_01_000001/tmp -Dspark.yarn.app.container.log.dir=/home/log/hadoop/logs/userlogs/application_1493800575189_0014/container_1493800575189_0014_01_000001 org.apache.spark.deploy.yarn.ApplicationMaster --class 'com.netease.ecom.data.gjs.statis.online.app.day.AppDayRealtimeStatis' --jar hdfs://datahdfsmaster/user/appuser/bjmazhengbing/jar/spark_streaming/spark-streaming-etl-2.0.jar --arg 'analysis_gjs_online.properties' --arg 'rrr' --properties-file /data6/data/hadoop/tmp/usercache/appuser/appcache/application_1493800575189_0014/container_1493800575189_0014_01_000001/__spark_conf__/__spark_conf__.properties 1> /home/log/hadoop/logs/userlogs/application_1493800575189_0014/container_1493800575189_0014_01_000001/stdout 2> /home/log/hadoop/logs/userlogs/application_1493800575189_0014/container_1493800575189_0014_01_000001/stderr 

据星火的正式文件,驱动程序都应该有用于监视一个4040端口,但是我的驱动程序似乎没有打开任何端口:

[[email protected] bin]$ netstat -ntlp|grep 125805 
(Not all processes could be identified, non-owned process info 
will not be shown, you would have to be root to see it all.) 

我最终找出驱动程序端口的目的是监视应用程序状态。有什么建议么?

回答

4

您列出的过程是执行者,而不是驱动程序。

当您在yarn-cluster模式下运行应用程序时,spark驱动程序和yarn application master在同一个JVM中运行。因此,确定Spark UI地址的最简单方法是转至资源管理器的用户界面,找到您的应用程序并单击指向Application Master的链接。这将是一个代理地址,指向驱动程序的ui端口。

+0

非常感谢您的帮助。我编辑了我的端口。请您给我更多建议吗? – wuchang

+0

您不需要登录到hadoop节点来确定端口。最简单的方法是使用资源管理器UI(如上所述),但是如果您使用CLI,则可以使用yarn命令:'$ yarn application -status application_1493800575189_0014'。这会显示跟踪火花驱动程序的URL。 – Mariusz

+0

伟大的工作! 'yarn application -status application_1493800575189_0014'提供非常有用的信息。非常感谢。 – wuchang

相关问题