繁体   English   中英

Flink V6 Rest API:如何获取所有已完成/已完成的作业

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM