Flink v6 rest api:如何获取所有已完成/已完成的作业



在 Flink v-1.4 中,有一个 rest api 来获取所有已完成/已完成的作业:

/

工作概述/已完成

正如我所看到的,v-1.6 中没有这样的 api,我怎么能只获得已完成/已完成的作业。

您可以通过配置和运行历史记录服务器来执行此操作。

在 flink-conf.yaml 中,您可以找到历史记录服务器的部分。为了在本地测试这一点,我尝试了以下设置:

#==============================================================================
# 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 的详细信息,请参阅可用请求列表。

最新更新