調用spark API,監控任務的進度


我們現在需要監控datapre0這個任務每一次執行的進度,操作如下:

1. 如圖所示,打開spark管理頁面,找到對應的任務,點擊任務名datapre0

 

2. 進去之后,獲得對應IP和端口

 

 3. 訪問api(linux直接通過curl訪問)

http://ip:4040/api/v1/application/Job_id

 

4. 其他API說明(對應spark官網連接 http://spark.apache.org/docs/latest/monitoring.html#rest-api)

/applications,獲取作業列表
/applications/[app-id]/jobs,指定作業的job列表
/applications/[app-id]/jobs/[job-id],指定job的信息
/applications/[app-id]/stages,指定作業的stage列表
/applications/[app-id]/stages/[stage-id],指定stage的所有attempt列表
/applications/[app-id]/stages/[stage-id]/[stage-attempt-id],指定stage attempt的信息
/applications/[app-id]/stages/[stage-id]/[stage-attempt-id]/taskSummary,指定stage attempt所有task的metrics統計信息
/applications/[app-id]/stages/[stage-id]/[stage-attempt-id]/taskList,指定stage attempt的task列表
/applications/[app-id]/executors,指定作業的executor列表
/applications/[app-id]/storage/rdd,指定作業的持久化rdd列表
/applications/[app-id]/storage/rdd/[rdd-id],指定持久化rdd的信息
/applications/[app-id]/logs,下載指定作業的所有日志的壓縮包
/applications/[app-id]/[attempt-id]/logs,下載指定作業的某次attempt的所有日志的壓縮包

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM