incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hama Wiki] Trivial Update of "SerializePrinting" by edwardyoon
Date Mon, 25 Oct 2010 01:24:36 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hama Wiki" for change notification.

The "SerializePrinting" page has been changed by edwardyoon.
The comment on this change is: interfaces changed..
http://wiki.apache.org/hama/SerializePrinting?action=diff&rev1=7&rev2=8

--------------------------------------------------

  
  {{{
  public class SerializePrinting {
- 
+   
    public static class HelloBSP extends BSP {
      public static final Log LOG = LogFactory.getLog(HelloBSP.class);
      private Configuration conf;
@@ -29, +29 @@

        int num = Integer.parseInt(conf.get("bsp.peers.num"));
  
        int i = 0;
-       for(Map.Entry<String, String> e : bspPeer.getAllPeers().entrySet()) {
+       for (String otherPeer : bspPeer.getAllPeerNames()) {
-         if(bspPeer.getHostName().equals(e.getValue())) {
+         if (bspPeer.getPeerName().equals(otherPeer)) {
            LOG.info("Hello BSP from " + i + " of " + num + ": "
-               + bspPeer.getHostName());
+               + bspPeer.getPeerName());
          }
- 
+         
          Thread.sleep(200);
          bspPeer.sync();
          i++;
@@ -57, +57 @@

        IOException {
      // BSP job configuration
      HamaConfiguration conf = new HamaConfiguration();
+     // Execute locally
+     // conf.set("bsp.master.address", "local");
  
      BSPJob bsp = new BSPJob(conf, SerializePrinting.class);
      // Set the job name

Mime
View raw message