hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjungb...@apache.org
Subject svn commit: r1376363 - in /hama/trunk: CHANGES.txt core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java graph/src/test/java/org/apache/hama/graph/TestSubmitGraphJob.java
Date Thu, 23 Aug 2012 04:30:39 GMT
Author: tjungblut
Date: Thu Aug 23 04:30:39 2012
New Revision: 1376363

URL: http://svn.apache.org/viewvc?rev=1376363&view=rev
Log:
[HAMA-633]: Fix CI Failure

Modified:
    hama/trunk/CHANGES.txt
    hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java
    hama/trunk/graph/src/test/java/org/apache/hama/graph/TestSubmitGraphJob.java

Modified: hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hama/trunk/CHANGES.txt?rev=1376363&r1=1376362&r2=1376363&view=diff
==============================================================================
--- hama/trunk/CHANGES.txt (original)
+++ hama/trunk/CHANGES.txt Thu Aug 23 04:30:39 2012
@@ -6,6 +6,7 @@ Release 0.6 (unreleased changes)
 
   BUG FIXES
 
+   HAMA-633: Fix CI Failures (tjungblut)
    HAMA-631: Add "commons-httpclient-3.1.jar" (Paul Gyuho Song via edwardyoon)
    HAMA-608: LocalRunner should honor the configured queues (tjungblut)
 

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java?rev=1376363&r1=1376362&r2=1376363&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java Thu Aug 23 04:30:39
2012
@@ -440,8 +440,11 @@ public final class BSPPeerImpl<K1, V1, K
       }
     }
 
-    leaveBarrier();
+    // Clear outgoing queues.
+    messenger.clearOutgoingQueues();
 
+    leaveBarrier();
+    
     incrementCounter(PeerCounter.TIME_IN_SYNC_MS,
         (System.currentTimeMillis() - startBarrier));
     incrementCounter(PeerCounter.SUPERSTEP_SUM, 1L);
@@ -457,29 +460,7 @@ public final class BSPPeerImpl<K1, V1, K
     }
 
     umbilical.statusUpdate(taskId, currentTaskStatus);
-    // Clear outgoing queues.
-    messenger.clearOutgoingQueues();
-
-    // int msgsCount = -1;
-    // if (shouldCheckPoint) {
-    // msgsCount = checkpointReceivedMessages(checkpointedReceivePath());
-    // }
-    //
-    // this.syncClient.storeInformation(this.syncClient.constructKey(
-    // this.bspJob.getJobID(), "checkpoint", String.valueOf(getPeerIndex())),
-    // new IntWritable(msgsCount), false, null);
-
-    // if (msgsCount >= 0) {
-    // ArrayWritable writableArray = new ArrayWritable(IntWritable.class);
-    // Writable[] writeArr = new Writable[2];
-    // writeArr[0] = new IntWritable((int) getSuperstepCount());
-    // writeArr[1] = new IntWritable(msgsCount);
-    // writableArray.set(writeArr);
-    // this.syncClient.storeInformation(
-    // this.syncClient.constructKey(this.bspJob.getJobID(), "checkpoint",
-    // String.valueOf(getPeerIndex())), writableArray, true, null);
-    // }
-
+    
   }
 
   private final BSPMessageBundle<M> combineMessages(Iterable<M> messages) {

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java?rev=1376363&r1=1376362&r2=1376363&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java Thu
Aug 23 04:30:39 2012
@@ -93,9 +93,9 @@ public class ZooKeeperSyncClientImpl ext
     try {
       synchronized (zk) {
 
-        final String pathToSuperstepZnode = 
-            constructKey(taskId.getJobID(), "sync", ""+superstep);
-        
+        final String pathToSuperstepZnode = constructKey(taskId.getJobID(),
+            "sync", "" + superstep);
+
         writeNode(pathToSuperstepZnode, null, true, null);
         BarrierWatcher barrierWatcher = new BarrierWatcher();
         // this is really needed to register the barrier watcher, don't remove
@@ -142,10 +142,10 @@ public class ZooKeeperSyncClientImpl ext
   public void leaveBarrier(final BSPJobID jobId, final TaskAttemptID taskId,
       final long superstep) throws SyncException {
     try {
-//      final String pathToSuperstepZnode = bspRoot + "/"
-//          + taskId.getJobID().toString() + "/" + superstep;
-      final String pathToSuperstepZnode = 
-          constructKey(taskId.getJobID(), "sync", ""+superstep);
+      // final String pathToSuperstepZnode = bspRoot + "/"
+      // + taskId.getJobID().toString() + "/" + superstep;
+      final String pathToSuperstepZnode = constructKey(taskId.getJobID(),
+          "sync", "" + superstep);
       while (true) {
         List<String> znodes = zk.getChildren(pathToSuperstepZnode, false);
         LOG.debug("leaveBarrier() !!! checking znodes contnains /ready node or not: at superstep:"
@@ -229,7 +229,7 @@ public class ZooKeeperSyncClientImpl ext
         }
       }
     } catch (Exception e) {
-      throw new SyncException(e.toString());
+      throw new SyncException(e.getMessage());
     }
   }
 
@@ -282,16 +282,15 @@ public class ZooKeeperSyncClientImpl ext
         for (String s : allPeers) {
           byte[] data = zk.getData(constructKey(taskId.getJobID(), "peers", s),
               this, null);
-          TaskAttemptID thatTask = new TaskAttemptID(); 
+          TaskAttemptID thatTask = new TaskAttemptID();
           boolean result = getValueFromBytes(data, thatTask);
 
-          if(result){
+          if (result) {
             LOG.debug("TASK mapping from zookeeper: " + thatTask + " ID:"
                 + thatTask.getTaskID().getId() + " : " + s);
             sortedMap.put(thatTask.getTaskID().getId(), s);
           }
 
-
         }
 
       } catch (Exception e) {
@@ -313,10 +312,9 @@ public class ZooKeeperSyncClientImpl ext
 
   @Override
   public void close() throws IOException {
-    try{
+    try {
       zk.close();
-    }
-    catch(InterruptedException e){
+    } catch (InterruptedException e) {
       throw new IOException(e);
     }
   }

Modified: hama/trunk/graph/src/test/java/org/apache/hama/graph/TestSubmitGraphJob.java
URL: http://svn.apache.org/viewvc/hama/trunk/graph/src/test/java/org/apache/hama/graph/TestSubmitGraphJob.java?rev=1376363&r1=1376362&r2=1376363&view=diff
==============================================================================
--- hama/trunk/graph/src/test/java/org/apache/hama/graph/TestSubmitGraphJob.java (original)
+++ hama/trunk/graph/src/test/java/org/apache/hama/graph/TestSubmitGraphJob.java Thu Aug 23
04:30:39 2012
@@ -108,10 +108,10 @@ public class TestSubmitGraphJob extends 
       while (reader.next(key, value)) {
         sum += value.get();
       }
+      reader.close();
     }
     LOG.info("Sum is: " + sum);
-    // TODO this actually means that the check for convergence is turned off
-    assertTrue(sum > 0.0d && sum <= 1.1d);
+    assertTrue(sum > 0.9d && sum <= 1.1d);
   }
 
   private void generateTestData() {



Mime
View raw message