flink的HistoryServer主要是用来存储和查看任务的历史记录,具体信息可以看官网:
https://ci.apache.org/projects/flink/flink-docs-release-1.8/monitoring/historyserver.html
下面主要分析一下参数配置:
conf/flink-conf.yaml文件
jobmanager.archive.fs.dir: hdfs://192.16.44.28:8020/flink/v1.0copy/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: 8088
# Comma separated list of directories to monitor for completed jobs.
historyserver.archive.fs.dir: hdfs://192.16.44.28:8020/flink/v1.0copy/completed-jobs/,hdfs://192.16.44.28:8020/flink/v1.0copy/h-completed-jobs/,hdfs://192.16.44.28:8020/flink/completed-jobs/
# Interval in milliseconds for refreshing the monitored directories.
historyserver.archive.fs.refresh-interval: 1000
#
jobmanager.archive.fs.dir 目录flink会自动创建,并将已完成的任务上传到此目录
historyserver.archive.fs.dir目录必须已存在,可以是多个,以逗号分隔,这些目录里的任务是最终在UI上显示出来的,其它集群的flink任务目录也可以写在这里。
historyserver是相对flink独立的进程,只是用到了flink的配置文件,flink集群未启动,也可以使用historyserver.
另外,historyserver.archive.fs.refresh-interval这个时间间隔貌似不起作用,任务显示花费的时间很长。