Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5888#discussion_r183355554 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java --- @@ -180,10 +180,22 @@ public void run() { // We overwrite existing files since this may be another attempt at fetching this archive. // Existing files may be incomplete/corrupt. + + //this is to save a job overview information, we put it in the ${path}/jobId folder + //because if put it in ${path}, new job inforamtion will override it and the web + //will show only one job all the same. + if (!target.toURI().toURL().getPath().contains(jobID)) { + Files.deleteIfExists(targetPath); + targetPath = new File(target.getParent() + "/" + jobID + "/" + target.getName()).toPath(); + } Files.deleteIfExists(targetPath); - Files.createFile(target.toPath()); - try (FileWriter fw = new FileWriter(target)) { + if (!targetPath.toFile().getParentFile().exists()) { --- End diff -- this change is unnecessary if the above change is reverted, since directories are already created at Line 174.
---