This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 878b6b1  [FLINK-13892][hs] Harden HistoryServerTest
878b6b1 is described below

commit 878b6b19e8e23d69299aa00fb48fa19c3a9116c9
Author: Chesnay Schepler <ches...@apache.org>
AuthorDate: Thu Sep 5 13:40:06 2019 +0200

    [FLINK-13892][hs] Harden HistoryServerTest
---
 .../runtime/webmonitor/history/HistoryServerArchiveFetcher.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
 
b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
index 47888cd..fed220f 100644
--- 
a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
+++ 
b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
@@ -153,6 +153,7 @@ class HistoryServerArchiveFetcher {
                                                continue;
                                        }
                                        boolean updateOverview = false;
+                                       int numFetchedArchives = 0;
                                        for (FileStatus jobArchive : 
jobArchives) {
                                                Path jobArchivePath = 
jobArchive.getPath();
                                                String jobID = 
jobArchivePath.getName();
@@ -200,7 +201,7 @@ class HistoryServerArchiveFetcher {
                                                                        }
                                                                }
                                                                updateOverview 
= true;
-                                                               
numArchivedJobs.countDown();
+                                                               
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
@@ -224,6 +225,9 @@ class HistoryServerArchiveFetcher {
                                        }
                                        if (updateOverview) {
                                                
updateJobOverview(webOverviewDir, webDir);
+                                               for (int x = 0; x < 
numFetchedArchives; x++) {
+                                                       
numArchivedJobs.countDown();
+                                               }
                                        }
                                }
                        } catch (Exception e) {

Reply via email to