yarn rest操作

说明

  • 本博客每周五更新一次。
  • 偶然知道 yarn 支持rest操作,惊喜中自觉知识狭隘,补充记录下。

分享

资料

  • 官方yarn rest接口文档网址

操作

  • 查看指定队列的所有任务:GET http://<rm http address:port>/ws/v1/cluster/apps?queue=对列名
  • 查看指定任务的详细信息:GET http://<rm http address:port>/ws/v1/cluster/apps/application_id
  • 查询集群调度器详情(包含队列信息):GET http://<rm http address:port>/ws/v1/cluster/scheduler
  • 查询集群指标:GET http://<rm http address:port>/ws/v1/cluster/metrics
  • 查看任务状态:
GET http://<rm http address:port>/ws/v1/cluster/apps/application_id/state
# curl实例
curl 'http://<rm http address:port>/ws/v1/cluster/apps/application_id/state'
  • 停止任务:
PUT http://<rm http address:port>/ws/v1/cluster/apps/application_id/state
#curl实例
curl -v -X PUT -d '{"state": "KILLED"}''http://<rm http address:port>/ws/v1/cluster/apps/application_id'

总结

  • 知识学习无穷无尽,怀着心跳不息,学习不止信念,只求今天的自己比昨天更优秀。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章