GIRAPH-1194
authorDionysios Logothetis <dlogothetis@gmail.com>
Sat, 26 May 2018 01:26:33 +0000 (18:26 -0700)
committerDionysios Logothetis <dionysios@fb.com>
Sat, 26 May 2018 01:26:33 +0000 (18:26 -0700)
closes #74

giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java

index 31d10df..1f8a77f 100644 (file)
@@ -1299,6 +1299,7 @@ public class BspServiceMaster<I extends WritableComparable,
     String workerInfoHealthyPath =
         getWorkerInfoHealthyPath(getApplicationAttempt(), getSuperstep());
     List<String> finishedHostnameIdList = new ArrayList<>();
+    List<String> tmpFinishedHostnameIdList;
     long nextInfoMillis = System.currentTimeMillis();
     final int defaultTaskTimeoutMsec = 10 * 60 * 1000;  // from TaskTracker
     final int waitBetweenLogInfoMsec = 30 * 1000;
@@ -1311,7 +1312,7 @@ public class BspServiceMaster<I extends WritableComparable,
     while (true) {
       if (! logInfoOnlyRun) {
         try {
-          finishedHostnameIdList =
+          tmpFinishedHostnameIdList =
               getZkExt().getChildrenExt(finishedWorkerPath,
                                         true,
                                         false,
@@ -1326,14 +1327,16 @@ public class BspServiceMaster<I extends WritableComparable,
                   "children of " + finishedWorkerPath, e);
         }
         if (LOG.isDebugEnabled()) {
-          LOG.debug("barrierOnWorkerList: Got finished worker list = " +
-                        finishedHostnameIdList + ", size = " +
-                        finishedHostnameIdList.size() +
-                        ", worker list = " +
-                        workerInfoList + ", size = " +
-                        workerInfoList.size() +
+          // Log the names of the new workers that have finished since last time
+          Set<String> newFinishedHostnames = Sets.difference(
+            Sets.newHashSet(tmpFinishedHostnameIdList),
+            Sets.newHashSet(finishedHostnameIdList));
+          LOG.debug("barrierOnWorkerList: Got new finished worker list = " +
+                        newFinishedHostnames + ", size = " +
+                        newFinishedHostnames.size() +
                         " from " + finishedWorkerPath);
         }
+        finishedHostnameIdList = tmpFinishedHostnameIdList;
       }
 
       if (LOG.isInfoEnabled() &&