美文网首页
Flink-历史服务器

Flink-历史服务器

作者: ssttIsme | 来源:发表于2026-03-27 17:43 被阅读0次

运行Flink job 的集群一旦停止,只能取yarn或本地磁盘上查看日志,不可以再查看作业挂掉之前的运行的Web UI,很男清除作业在挂掉的那一刻到底发生了什么。Flink提供了历史服务器,用来在相应的Flink集群关闭后查询已完成的作业统计信息。

[server@hadoop102 ~]$ hadoop fs -mkdir -p /logs/flink-job

http://hadoop102:9870/explorer.html#/logs

[server@hadoop102 ~]$ cd /opt/module/flink-1.17.0/conf/
[server@hadoop102 conf]$ vim flink-conf.yaml 
jobmanager.archive.fs.dir: hdfs://hadoop102/logs/flink-job/flink-job

# The address under which the web-based HistoryServer listens.
historyserver.web.address: hadoop102

# 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: hdfs://hadoop102/logs/flink-job/flink-job

# Interval in milliseconds for refreshing the monitored directories.
historyserver.archive.fs.refresh-interval: 5000
[server@hadoop102 conf]$ cd ..
[server@hadoop102 flink-1.17.0]$ pwd
/opt/module/flink-1.17.0
[server@hadoop102 flink-1.17.0]$ bin/historyserver.sh start

http://hadoop102:8082/#/overview

相关文章

网友评论

      本文标题:Flink-历史服务器

      本文链接:https://www.haomeiwen.com/subject/ectpsstx.html