Apache flink Flink历史记录服务器未显示正在运行的应用程序

Apache flink Flink历史记录服务器未显示正在运行的应用程序,apache-flink,Apache Flink,我正在尝试配置flink历史服务器。我遵循了弗林克文件。我可以打开历史服务器,但只能看到已完成的作业,而不能看到正在运行的作业。我是否遗漏了什么,或者只是完成的作业显示在历史记录服务器中。请帮忙 集群中当前的作业: #============================================================================== # HistoryServer #=============================================

我正在尝试配置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
本地主机: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
            }
        }
    ]
}
{
    "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
            }
        }
    ]
}
历史记录服务器中可用的作业

本地主机:8082/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
            }
        }
    ]
}
{
    "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
#==============================================================================
#历史服务器
#==============================================================================
#HistoryServer通过bin/HistoryServer.sh启动和停止(启动|停止)
#要将完成的作业上载到的目录。将此目录添加到目录列表中
#HistoryServer的受监控目录(见下文)。
jobmanager.archive.fs.dir:hdfs://:8020/sax/flink/jobmanager
#基于web的HistoryServer侦听的地址。
historyserver.web.address:localhost
#基于web的HistoryServer侦听的端口。
historyserver.web.port:8082
#要监视已完成作业的目录的逗号分隔列表。
historyserver.archive.fs.dir:hdfs://:8020/sax/flink/jobmanager
#刷新受监视目录的间隔(毫秒)。
historyserver.archive.fs.refresh-interval:10000

您链接的Flink网站的第一行内容是:

Flink有一个历史服务器,可以用来查询 关闭相应的Flink群集后已完成作业 放下

其中还说,

HistoryServer允许您查询的状态和统计信息 作业管理器存档的已完成作业

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


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

非常感谢您的回复。是的,我已经阅读了文档,很明显,history server中只显示已完成的作业。我很困惑,因为我将它与spark history server进行了比较,在那里我们可以看到正在运行和已完成的作业。在Flink中,我可以看到json正在运行并已完成,但运行的json总是空的。这就是为什么我贴出这个问题来澄清我的疑问。跑步总是空的吗?你能不能用更多的信息来更新这个问题,这样我们就可以看看到底哪里出了问题。否则,如果答案对您有帮助,您可以将其标记为已接受。