Yes, boolean is enough. In PR example, iteration 30 is just a arbitrary number. I had just copy and paste Pregel example. Actually, program should run until convergence is achieved. If you are saying about unit test of PageRank, then +1.
On Wed, Apr 18, 2012 at 4:22 PM, Praveen Sripati <[email protected]> wrote: > 1) I was looking in the ShortestPath#bsp() (1) on when the program gets out > the main while loop. Not sure if I understood it properly, but it looks a > bit complicated without much comments. Similar logic has been applied in > the org.apache.hama.graph.GraphJobRunner#bsp() also. > > Basically, each of the bsp task should send a boolean to a master depending > on any messages have been sent to other peers or not. The master if there > is atleast one true from any one of the peer, will send a true back to all > the peers to continue the processing. Or else the bsp task can send a > boolean to all the peers instead of the master to avoid an additional > sync(). It is as simple as that. > > The number of updates vertex which have been updated should not matter. > What is the purpose of the updatesMade and the globalUpdateCounts integer > variables? > > 2) Also, in the PageRank(2) the convergence is not tested, the program just > goes through the loop maxIteration # of times. Is a test for convergence > required in the graph package? > > Praveen > > (1) - > https://svn.apache.org/repos/asf/incubator/hama/branches/0.4/examples/src/main/java/org/apache/hama/examples/ShortestPaths.java > (2) - > https://svn.apache.org/repos/asf/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java -- Best Regards, Edward J. Yoon @eddieyoon
