You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by Apache Wiki <wi...@apache.org> on 2012/06/17 13:08:46 UTC

[Hama Wiki] Update of "DevelopBSP" by thomasjungblut

Dear Wiki user,

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

The "DevelopBSP" page has been changed by thomasjungblut:
http://wiki.apache.org/hama/DevelopBSP?action=diff&rev1=3&rev2=4

  	    // produces new random integers every second
  	    while (true) {
  		int newInt = random.nextInt();
+                 // just send to other not master peers
- 		peer.send(peer.getAllPeerNames()[Math.abs(newInt % peer.getNumPeers())],
+ 		peer.send(peer.getAllPeerNames()[Math.abs(newInt % (peer.getNumPeers()-1))+1],
  			new IntWritable(newInt));
  		System.out.println("Sending " + newInt);
  		peer.sync();