在Flink v-1.4中,有一个REST API来获取所有已完成/已完成的工作:
/ joboverview / completed
正如我所见,v-1.6中没有这样的api,我怎么才能只获得完成的工作?
答案 0 :(得分:0)
您可以通过配置和运行History Server来做到这一点。
在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
(json)处看到完成的作业。
有关API的更多信息,请参见available requests列表。