incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjungb...@apache.org
Subject svn commit: r1182287 - in /incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp: BSPPeerImpl.java BSPRunner.java BSPTaskLauncher.java YarnSerializePrinting.java sync/SyncServer.java sync/SyncServerImpl.java
Date Wed, 12 Oct 2011 09:38:59 GMT
Author: tjungblut
Date: Wed Oct 12 09:38:59 2011
New Revision: 1182287

URL: http://svn.apache.org/viewvc?rev=1182287&view=rev
Log:
full working first snapshot.

Modified:
    incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
    incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPRunner.java
    incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPTaskLauncher.java
    incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/YarnSerializePrinting.java
    incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServer.java
    incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServerImpl.java

Modified: incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java?rev=1182287&r1=1182286&r2=1182287&view=diff
==============================================================================
--- incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
(original)
+++ incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
Wed Oct 12 09:38:59 2011
@@ -205,6 +205,7 @@ public class BSPPeerImpl implements BSPP
     syncService = SyncServerImpl.getService(conf);
     syncService.register(taskid, new Text(peerAddress.getHostName()),
         new LongWritable(peerAddress.getPort()));
+    currentTaskStatus = new TaskStatus();
   }
 
   public void reinitialize() {
@@ -412,7 +413,7 @@ public class BSPPeerImpl implements BSPP
 
   @Override
   public String[] getAllPeerNames() {
-    return syncService.getAllPeerNames().toStrings();
+    return syncService.getAllPeerNames().get();
   }
 
   /**

Modified: incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPRunner.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPRunner.java?rev=1182287&r1=1182286&r2=1182287&view=diff
==============================================================================
--- incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPRunner.java
(original)
+++ incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPRunner.java
Wed Oct 12 09:38:59 2011
@@ -77,6 +77,7 @@ public class BSPRunner {
   public static void main(String[] args) throws NumberFormatException,
       IOException, ClassNotFoundException, KeeperException,
       InterruptedException {
+    LOG.info("Starting task with arguments: " + Arrays.toString(args));
     if (args.length != 3) {
       throw new IllegalArgumentException("Expected 3 args given, but found: "
           + Arrays.toString(args));

Modified: incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPTaskLauncher.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPTaskLauncher.java?rev=1182287&r1=1182286&r2=1182287&view=diff
==============================================================================
--- incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPTaskLauncher.java
(original)
+++ incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/BSPTaskLauncher.java
Wed Oct 12 09:38:59 2011
@@ -143,7 +143,7 @@ public class BSPTaskLauncher implements 
       LOG.info("Localized file scheme detected, adjusting CP to: " + cp);
     }
     String[] cmds = {
-        "${JAVA_HOME}" + "/bin/java -cp '" + cp + "' "
+        "${JAVA_HOME}" + "/bin/java -cp \"" + cp + "\" "
             + BSPRunner.class.getCanonicalName(),
         jobId.getJtIdentifier(),
         id + "",

Modified: incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/YarnSerializePrinting.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/YarnSerializePrinting.java?rev=1182287&r1=1182286&r2=1182287&view=diff
==============================================================================
--- incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/YarnSerializePrinting.java
(original)
+++ incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/YarnSerializePrinting.java
Wed Oct 12 09:38:59 2011
@@ -72,8 +72,8 @@ public class YarnSerializePrinting {
     job.setBspClass(HelloBSP.class);
     job.setJarByClass(HelloBSP.class);
     job.setJobName("Serialize Printing");
-    job.setMemoryUsedPerTaskInMb(512);
-    job.setNumBspTask(3);
+    job.setMemoryUsedPerTaskInMb(2048);
+    job.setNumBspTask(2);
     // TODO true throws exceptions
     job.waitForCompletion(false);
   }

Modified: incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServer.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServer.java?rev=1182287&r1=1182286&r2=1182287&view=diff
==============================================================================
--- incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServer.java
(original)
+++ incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServer.java
Wed Oct 12 09:38:59 2011
@@ -17,7 +17,6 @@
  */
 package org.apache.hama.bsp.sync;
 
-import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.ipc.VersionedProtocol;
@@ -29,7 +28,7 @@ import org.apache.hama.bsp.TaskAttemptID
  */
 public interface SyncServer extends VersionedProtocol {
 
-  public static final long versionID = 1L;
+  public static final long versionID = 0L;
 
   public void enterBarrier(TaskAttemptID id);
 
@@ -39,7 +38,7 @@ public interface SyncServer extends Vers
 
   public LongWritable getSuperStep();
 
-  public ArrayWritable getAllPeerNames();
+  public StringArrayWritable getAllPeerNames();
 
   public void deregisterFromBarrier(TaskAttemptID id, Text hostAddress,
       LongWritable port);

Modified: incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServerImpl.java?rev=1182287&r1=1182286&r2=1182287&view=diff
==============================================================================
--- incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServerImpl.java
(original)
+++ incubator/hama/branches/HamaV2/server/src/main/java/org/apache/hama/bsp/sync/SyncServerImpl.java
Wed Oct 12 09:38:59 2011
@@ -30,7 +30,6 @@ import java.util.concurrent.CyclicBarrie
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.ipc.ProtocolSignature;
@@ -196,10 +195,9 @@ public class SyncServerImpl implements S
   }
 
   @Override
-  public synchronized ArrayWritable getAllPeerNames() {
-    ArrayWritable writable = new ArrayWritable(
+  public synchronized StringArrayWritable getAllPeerNames() {
+    return new StringArrayWritable(
         peerAddresses.toArray(new String[peerAddresses.size()]));
-    return writable;
   }
 
   @Override



Mime
View raw message