incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1032467 - in /incubator/hama/trunk: CHANGES.txt src/examples/org/apache/hama/examples/SerializePrinting.java src/java/org/apache/hama/bsp/BSPTaskRunner.java src/java/org/apache/hama/bsp/GroomServer.java
Date Mon, 08 Nov 2010 06:14:53 GMT
Author: edwardyoon
Date: Mon Nov  8 06:14:52 2010
New Revision: 1032467

URL: http://svn.apache.org/viewvc?rev=1032467&view=rev
Log:
GroomServer should wait until a job finishes

Modified:
    incubator/hama/trunk/CHANGES.txt
    incubator/hama/trunk/src/examples/org/apache/hama/examples/SerializePrinting.java
    incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTaskRunner.java
    incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java

Modified: incubator/hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/CHANGES.txt?rev=1032467&r1=1032466&r2=1032467&view=diff
==============================================================================
--- incubator/hama/trunk/CHANGES.txt (original)
+++ incubator/hama/trunk/CHANGES.txt Mon Nov  8 06:14:52 2010
@@ -177,6 +177,7 @@ Trunk (unreleased changes)
 
   BUG FIXES
   
+    HAMA-326: GroomServer should wait until a job finishes (edwardyoon)
     HAMA-324: Removing javadoc warnings and useless libraries (edwardyoon)
     HAMA-322: Make sure failed assertions on test threads are reported
                (Filipe Manana via edwardyoon)  

Modified: incubator/hama/trunk/src/examples/org/apache/hama/examples/SerializePrinting.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/examples/org/apache/hama/examples/SerializePrinting.java?rev=1032467&r1=1032466&r2=1032467&view=diff
==============================================================================
--- incubator/hama/trunk/src/examples/org/apache/hama/examples/SerializePrinting.java (original)
+++ incubator/hama/trunk/src/examples/org/apache/hama/examples/SerializePrinting.java Mon
Nov  8 06:14:52 2010
@@ -34,6 +34,7 @@ public class SerializePrinting {
   public static class HelloBSP extends BSP {
     public static final Log LOG = LogFactory.getLog(HelloBSP.class);
     private Configuration conf;
+    private final static int PRINT_INTERVAL = 5000;
 
     @Override
     public void bsp(BSPPeer bspPeer) throws IOException, KeeperException,
@@ -47,7 +48,7 @@ public class SerializePrinting {
               + bspPeer.getPeerName());
         }
         
-        Thread.sleep(200);
+        Thread.sleep(PRINT_INTERVAL);
         bspPeer.sync();
         i++;
       }

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTaskRunner.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTaskRunner.java?rev=1032467&r1=1032466&r2=1032467&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTaskRunner.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTaskRunner.java Mon Nov  8 06:14:52
2010
@@ -56,6 +56,13 @@ public class BSPTaskRunner extends Threa
     } catch (InterruptedException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
+    } finally {
+      try {
+        finalize();
+      } catch (Throwable e) {
+        // TODO Auto-generated catch block
+        e.printStackTrace();
+      }
     }
   }
 

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java?rev=1032467&r1=1032466&r2=1032467&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java Mon Nov  8 06:14:52
2010
@@ -545,9 +545,9 @@ public class GroomServer implements Runn
           e.printStackTrace();
         }
 
-        // If local/outgoing queues are empty, task is done.
         if (bspPeer.localQueue.size() == 0
-            && bspPeer.outgoingQueues.size() == 0) {
+            && bspPeer.outgoingQueues.size() == 0
+            && !runner.isAlive()) {
           taskStatus.setRunState(TaskStatus.State.SUCCEEDED);
           acceptNewTasks = true;
           break;



Mime
View raw message