要检查Apache spark中正在运行的应用程序,可以从URL上的Web界面检查它们:
http://<master>:8080
我的问题是如何从终端检查运行的应用程序,是否有任何返回应用程序状态的命令?
Jac*_*ski 11
如果它适用于Spark Standalone或Apache Mesos集群管理器,@ sb0709的答案是可以遵循的方法.
对于YARN,您应该使用yarn应用程序命令:
$ yarn application -help
usage: application
-appStates <States> Works with -list to filter applications
based on input comma-separated list of
application states. The valid application
state can be one of the following:
ALL,NEW,NEW_SAVING,SUBMITTED,ACCEPTED,RUN
NING,FINISHED,FAILED,KILLED
-appTypes <Types> Works with -list to filter applications
based on input comma-separated list of
application types.
-help Displays help for all commands.
-kill <Application ID> Kills the application.
-list List applications. Supports optional use
of -appTypes to filter applications based
on application type, and -appStates to
filter applications based on application
state.
-movetoqueue <Application ID> Moves the application to a different
queue.
-queue <Queue Name> Works with the movetoqueue command to
specify which queue to move an
application to.
-status <Application ID> Prints the status of the application.
Run Code Online (Sandbox Code Playgroud)
您可以使用spark-submit --status(如掌握Apache Spark 2.0中所述).
spark-submit --status [submission ID]
Run Code Online (Sandbox Code Playgroud)
请参阅spark-submit的代码以供参考:
if (!master.startsWith("spark://") && !master.startsWith("mesos://")) {
SparkSubmit.printErrorAndExit(
"Requesting submission statuses is only supported in standalone or Mesos mode!")
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
37506 次 |
| 最近记录: |