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'

總結

  • 知識學習無窮無盡,懷着心跳不息,學習不止信念,只求今天的自己比昨天更優秀。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章