You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ac...@apache.org on 2011/12/18 17:59:00 UTC

svn commit: r1220454 - in /incubator/giraph/trunk: CHANGELOG src/main/java/org/apache/giraph/graph/BspServiceMaster.java

Author: aching
Date: Sun Dec 18 16:58:59 2011
New Revision: 1220454

URL: http://svn.apache.org/viewvc?rev=1220454&view=rev
Log:
GIRAPH-105: BspServiceMaster.checkWorkers() should return empty lists
instead of null. (ssc via aching)


Modified:
    incubator/giraph/trunk/CHANGELOG
    incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/BspServiceMaster.java

Modified: incubator/giraph/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/CHANGELOG?rev=1220454&r1=1220453&r2=1220454&view=diff
==============================================================================
--- incubator/giraph/trunk/CHANGELOG (original)
+++ incubator/giraph/trunk/CHANGELOG Sun Dec 18 16:58:59 2011
@@ -2,6 +2,9 @@ Giraph Change Log
 
 Release 0.70.0 - unreleased
 
+  GIRAPH-105: BspServiceMaster.checkWorkers() should return empty
+  lists instead of null. (ssc via aching)
+
   GIRAPH-80: Don't expose the list holding the messages in
   BasicVertex. (ssc via aching)
 

Modified: incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/BspServiceMaster.java
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/BspServiceMaster.java?rev=1220454&r1=1220453&r2=1220454&view=diff
==============================================================================
--- incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/BspServiceMaster.java (original)
+++ incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/BspServiceMaster.java Sun Dec 18 16:58:59 2011
@@ -366,7 +366,8 @@ public class BspServiceMaster<
      * Check all the {@link WorkerInfo} objects to ensure that a minimum
      * number of good workers exists out of the total that have reported.
      *
-     * @return List of of healthy workers
+     * @return List of of healthy workers such that the minimum has been
+     *         met, otherwise null
      */
     private List<WorkerInfo> checkWorkers() {
         boolean failJob = true;
@@ -484,7 +485,7 @@ public class BspServiceMaster<
         // When creating znodes, in case the master has already run, resume
         // where it left off.
         List<WorkerInfo> healthyWorkerInfoList = checkWorkers();
-        if (healthyWorkerInfoList.isEmpty()) {
+        if (healthyWorkerInfoList == null) {
             setJobState(ApplicationState.FAILED, -1, -1);
             return -1;
         }
@@ -1386,7 +1387,7 @@ public class BspServiceMaster<
         // 5. Create superstep finished node
         // 6. If the checkpoint frequency is met, finalize the checkpoint
         List<WorkerInfo> chosenWorkerInfoList = checkWorkers();
-        if (chosenWorkerInfoList.isEmpty()) {
+        if (chosenWorkerInfoList == null) {
             LOG.fatal("coordinateSuperstep: Not enough healthy workers for " +
                       "superstep " + getSuperstep());
             setJobState(ApplicationState.FAILED, -1, -1);