hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjungb...@apache.org
Subject svn commit: r1350876 - in /hama/trunk/core/src/main/java/org/apache/hama/bsp: BSPMaster.java TaskInProgress.java
Date Sat, 16 Jun 2012 07:17:11 GMT
Author: tjungblut
Date: Sat Jun 16 07:17:11 2012
New Revision: 1350876

URL: http://svn.apache.org/viewvc?rev=1350876&view=rev
Log:
add debug output for problems and fixing empty path problems

Modified:
    hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/TaskInProgress.java

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java?rev=1350876&r1=1350875&r2=1350876&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java Sat Jun 16 07:17:11 2012
@@ -509,7 +509,12 @@ public class BSPMaster implements JobSub
     clearZKNodes(zk, bspRoot);
   }
 
-  public static void clearZKNodes(ZooKeeper zk, String path) {
+  public static void clearZKNodes(ZooKeeper zk, String pPath) {
+    String path = pPath;
+    if (!path.startsWith("/")) {
+      path = "/" + path;
+      LOG.warn("Path did not start with /, adding it: " + path);
+    }
     try {
       Stat s = zk.exists(path, false);
       if (s != null) {

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/TaskInProgress.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/TaskInProgress.java?rev=1350876&r1=1350875&r2=1350876&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/TaskInProgress.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/TaskInProgress.java Sat Jun 16 07:17:11
2012
@@ -146,6 +146,11 @@ class TaskInProgress {
       for (int i = 0; i < possibleLocations.length; ++i) {
         String location = possibleLocations[i];
         GroomServerStatus groom = grooms.get(location);
+        if (groom == null) {
+          LOG.error("Could not find groom for location: "
+              + rawSplit.getLocations() + " ; active grooms: "
+              + grooms.keySet());
+        }
         Integer taskInGroom = tasksInGroomMap.get(groom);
         taskInGroom = (taskInGroom == null) ? 0 : taskInGroom;
         if (taskInGroom < groom.getMaxTasks()



Mime
View raw message