Skip to content

Commit

Permalink
[FLINK-14337][hs] Only mark archives as processed on success
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Oct 16, 2019
1 parent 26bc3c8 commit 88ae9f8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void run() {
refreshDir, jobID, iae);
continue;
}
if (cachedArchives.add(jobID)) {
if (!cachedArchives.contains(jobID)) {
try {
for (ArchivedJson archive : FsJobArchivist.getArchivedJsons(jobArchive.getPath())) {
String path = archive.getPath();
Expand Down Expand Up @@ -200,11 +200,10 @@ public void run() {
fw.flush();
}
}
cachedArchives.add(jobID);
numFetchedArchives++;
} catch (IOException e) {
LOG.error("Failure while fetching/processing job archive for job {}.", jobID, e);
// Make sure we attempt to fetch the archive again
cachedArchives.remove(jobID);
// Make sure we do not include this job in the overview
try {
Files.delete(new File(webOverviewDir, jobID + JSON_FILE_ENDING).toPath());
Expand Down

0 comments on commit 88ae9f8

Please sign in to comment.