incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1162690 - in /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples: PiEstimator.java SerializePrinting.java
Date Mon, 29 Aug 2011 09:19:17 GMT
Author: edwardyoon
Date: Mon Aug 29 09:19:17 2011
New Revision: 1162690

URL: http://svn.apache.org/viewvc?rev=1162690&view=rev
Log:
examples were missed in commit of HAMA-413

Modified:
    incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PiEstimator.java
    incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/SerializePrinting.java

Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PiEstimator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PiEstimator.java?rev=1162690&r1=1162689&r2=1162690&view=diff
==============================================================================
--- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PiEstimator.java
(original)
+++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PiEstimator.java
Mon Aug 29 09:19:17 2011
@@ -27,6 +27,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.DoubleWritable;
 import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.SequenceFile.CompressionType;
+import org.apache.hama.Constants;
 import org.apache.hama.HamaConfiguration;
 import org.apache.hama.bsp.BSP;
 import org.apache.hama.bsp.BSPJob;
@@ -137,8 +138,8 @@ public class PiEstimator {
     }
 
     // Choose one as a master
-    for (String peerName : cluster.getActiveGroomNames().values()) {
-      conf.set(MASTER_TASK, peerName);
+    for (String hostName : cluster.getActiveGroomNames().values()) {
+      conf.set(MASTER_TASK, hostName + ":" + Constants.DEFAULT_PEER_PORT);
       break;
     }
 

Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/SerializePrinting.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/SerializePrinting.java?rev=1162690&r1=1162689&r2=1162690&view=diff
==============================================================================
--- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/SerializePrinting.java
(original)
+++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/SerializePrinting.java
Mon Aug 29 09:19:17 2011
@@ -47,9 +47,10 @@ public class SerializePrinting {
     private FileSystem fileSys;
     private int num;
 
-    public void bsp(BSPPeer bspPeer) throws IOException,
-        KeeperException, InterruptedException {
+    public void bsp(BSPPeer bspPeer) throws IOException, KeeperException,
+        InterruptedException {
 
+      LOG.info(bspPeer.getAllPeerNames());
       int i = 0;
       for (String otherPeer : bspPeer.getAllPeerNames()) {
         String peerName = bspPeer.getPeerName();



Mime
View raw message