[英]Flink v6 rest api : how to get all the finished/completed jobs
在Flink v-1.4中,有一個rest api來獲取所有完成/完成的工作:
/ joboverview /已完成
如我所見,v-1.6中沒有此類api,我如何才能僅獲得已完成/已完成的工作。
您可以通過配置和運行歷史記錄服務器來實現 。
在flink-conf.yaml中,您將找到History Server的一部分。 為了在本地測試,我嘗試了以下設置:
#==============================================================================
# HistoryServer
#==============================================================================
# The HistoryServer is started and stopped via bin/historyserver.sh (start|stop)
# Directory to upload completed jobs to. Add this directory to the list of
# monitored directories of the HistoryServer as well (see below).
jobmanager.archive.fs.dir: file:///tmp/completed-jobs/
# The address under which the web-based HistoryServer listens.
#historyserver.web.address: 0.0.0.0
# The port under which the web-based HistoryServer listens.
#historyserver.web.port: 8082
# Comma separated list of directories to monitor for completed jobs.
historyserver.archive.fs.dir: file:///tmp/completed-jobs/
# Interval in milliseconds for refreshing the monitored directories.
historyserver.archive.fs.refresh-interval: 10000
我創建了/tmp/completed-jobs
,重新啟動了集群,並啟動了歷史記錄服務器,此后,我能夠在http://localhost:8082
(html)和http://localhost:8082/jobs/overview
上看到完成的http://localhost:8082/jobs/overview
(json)。
請參閱可用請求列表,以獲取有關API的更多信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.