Flink历史服务器未显示正在运行的应用

时间:2017-09-21 09:28:33

标签: apache-flink

我正在尝试配置flink历史记录服务器。我已经关注了flink文档here。我能够启动历史服务器,但只能查看已完成的作业,而不能查看正在运行的作业。我错过了什么,或者只是已完成的作业显示在历史服务器中。请帮助。

当前在群集中的作业:

本地主机:8081 / joboverview

{
    "running": [
        {
            "jid": "e4e6edb76b887054d7aca460b7136937",
            "name": "Filter",
            "state": "RUNNING",
            "start-time": 1505971363801,
            "end-time": -1,
            "duration": 11588615,
            "last-modification": 1505971363832,
            "tasks": {
                "total": 1,
                "pending": 0,
                "running": 1,
                "finished": 0,
                "canceling": 0,
                "canceled": 0,
                "failed": 0
            }
        }
    ],
    "finished": [
        {
            "jid": "ec16f4cf01192268150c750966cefd0d",
            "name": "Flink Java Job at Thu Sep 21 10:52:09 IST 2017",
            "state": "FINISHED",
            "start-time": 1505971329989,
            "end-time": 1505971330746,
            "duration": 757,
            "last-modification": 1505971330746,
            "tasks": {
                "total": 3,
                "pending": 0,
                "running": 0,
                "finished": 3,
                "canceling": 0,
                "canceled": 0,
                "failed": 0
            }
        }
    ]
}

历史服务器中可用的作业

本地主机:8082 / joboverview

{
    "running": [],
    "finished": [
        {
            "jid": "ec16f4cf01192268150c750966cefd0d",
            "name": "Flink Java Job at Thu Sep 21 10:52:09 IST 2017",
            "state": "FINISHED",
            "start-time": 1505971329989,
            "end-time": 1505971330746,
            "duration": 757,
            "last-modification": 1505971330746,
            "tasks": {
                "total": 3,
                "pending": 0,
                "running": 0,
                "finished": 3,
                "canceling": 0,
                "canceled": 0,
                "failed": 0
            }
        }
    ]
}

Flink历史记录服务器配置:

#==============================================================================
# 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: hdfs://<hdfs>:8020/sax/flink/jobmanager

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

# 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://<hdfs>:8020/sax/flink/jobmanager

# Interval in milliseconds for refreshing the monitored directories.
historyserver.archive.fs.refresh-interval: 10000

1 个答案:

答案 0 :(得分:0)

您链接的Flink网站的第一行说明:

  

Flink有一个历史记录服务器,可用于查询统计信息   关闭相应的Flink群集后,已完成的作业   下来。

也说明了

  

HistoryServer允许您查询状态和统计信息   已由JobManager归档的已完成的作业

现在从我看到的,您还可以访问使用“localhost:8081 / joboverview”访问的监控api,如果您只想访问正在运行的作业,可以使用“/ joboverview / running”uri访问它们

您可以在此处的Monitoring API链接中找到更多信息。