Jindrich Vimr created FLINK-18360:
-------------------------------------
Summary: Flink History Server doesn't show correctly table of Completed jobs when there are no archived jobs are in the archive directory
Key: FLINK-18360
URL:
https://issues.apache.org/jira/browse/FLINK-18360 Project: Flink
Issue Type: Bug
Components: Runtime / Web Frontend
Affects Versions: 1.10.1, 1.10.0, 1.11.0, 1.10.2, 1.12.0, 1.11.1
Reporter: Jindrich Vimr
Attachments: flink-hs-correct-no-jobs.png, flink-hs-no-data-shown.png
When the directory defined in ${historyserver.archive.fs.dir} is empty (=there are no archived completed jobs), the History Server UI fails to show the Completed Jobs table.
It should show the empty table with correct column headers and "No data" icon.
This is due to file ${historyserver.web.tmpdir}/jobs/overview.json not being created. This file is fetched by the web UI from url `/jobs/overview`.
This file is correctly created and populated by the History Server if the directory defined in ${historyserver.archive.fs.dir} contains any job.
The situation when the Completed Jobs table is not populated normally indicates that the History Server stars up and processes the jobs in the archive, so the user should wait.
This happened to us few times, as we waited for the HS to finish the archived jobs processing just to find out after hours that the HS has in fact nothing to show.
The fix is simple, by removing `
{code:java}
if (!events.isEmpty()){code}
condition around
{code:java}
updateJobOverview(webOverviewDir, webDir){code}
in the [HistoryServerArchiveFetcher.java|[
https://github.com/apache/flink/blob/master/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java#L288]]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)