Hi Apurv, frankly it works for me:
part-0000 contains: D 6 A 6 part-0001 contains: B 6 and part-0002 contains: C 6 2012/5/30 Apurv Verma <[email protected]> > Here is how I think my algo works. Please tell me where I am wrong. > > > @Override > public void compute(Iterator<IntWritable> messages) throws IOException { > IntWritable currentMax = this.getValue(); > > > System.err.println(); > System.err.println(getSuperstepCount()); > System.err.println("At node "+this.getVertexID()); > > IN THE 0th SUPERSTEP, ALL VERTICES SEND THEIR VALUES TO ALL NEIGHBORING > VERTICES AND RETURN. > > if(getSuperstepCount() == 0L){ > System.err.println("sending msg to all neighbors > ..."+currentMax.toString()); > sendMessageToNeighbors(currentMax); > return; > } > > //FOR ALL SUBSEQUENT SUPERSTEPS, EACH VERTEX LOOKS AT ALL VALUES IT HAS > RECEIEVED AND STORES THE MAX VALUE RECEIVED IN currentMax. > > while(messages.hasNext()){ > IntWritable msg = messages.next(); > currentMax = (msg.compareTo(currentMax) > 0)?msg:currentMax; > } > > //IF THERE IS AN UPDATE IN THE CURRENT VALUE OF THE VERTEX, THAT MEANS THAT > THE VERTEX HAS NOT VOTED TO HALT SO IT SHOULD SEND MESSAGES TO ALL ITS > NEIGHBORING NODES. > > if(currentMax.compareTo(getValue()) > 0){ > System.err.println("updating value to ..."+currentMax.toString()); > this.setValue(currentMax); > sendMessageToNeighbors(getValue()); > } > else{ > IF NOT IT SHOULD SEND NO MESSAGES. i.e. THE VERTEX HAS VOTED TO HALT. > System.err.println("voting to halt..."); > } > > System.err.println(); > } > } > > AT THE END I EXPECT TO SEE AN OUTPUT FILE WHICH SHOULD BE SOMETHING LIKE > THIS > A 6 > B 6 > C 6 > D 6 > > But the job fails. And there are 3 output files created part-00000 which is > empty, part-00001, again empty. and part-00002 which has C 2 written in it. > > -- > thanks and regards, > > Apurv Verma > India > > > > > > On Wed, May 30, 2012 at 12:41 PM, Apurv Verma <[email protected]> wrote: > > > Yes, I ran that example by copying it verbatim, it ran. Don't know why my > > MaxFindVertex is not working. > > > > > > -- > > thanks and regards, > > > > Apurv Verma > > India > > > > > > > > > > > > On Wed, May 30, 2012 at 11:31 AM, Thomas Jungblut < > > [email protected]> wrote: > > > >> Oops, I have read "with aggregator" and not without. I'm sorry Apurv. > >> Do you had a look at the mindist search/connected component example in > >> example package? It does actually the same but inverted. > >> > >> > >> 2012/5/30 Apurv Verma <[email protected]> > >> > >> > Isn't an aggregator optional? > >> > > >> > -- > >> > thanks and regards, > >> > > >> > Apurv Verma > >> > India > >> > > >> > > >> > > >> > > >> > > >> > On Wed, May 30, 2012 at 11:26 AM, Thomas Jungblut < > >> > [email protected]> wrote: > >> > > >> > > Hi Apurv, > >> > > > >> > > there is no aggregator defined in your code. > >> > > > >> > > 2012/5/30 Apurv Verma <[email protected]> > >> > > > >> > > > Hello, > >> > > > After several attempts I was unable to run the MaxFindVertex > >> without > >> > > using > >> > > > Aggregators. > >> > > > > >> > > > Here is the source code. http://pastebin.com/VMTXPtRR. I have > >> changed > >> > > the > >> > > > num of bsp tasks to 1,2 and 3 but still it doesn't work. The input > >> > graph > >> > > > file is very small. > >> > > > Here is the graph file. http://pastebin.com/uAJASSRi > >> > > > > >> > > > Here are the logs. > >> > > > > >> > > > These are the task logs. > >> > > > > >> > > > 1. http://pastebin.com/imMKB6Hs > >> > > > 2. http://pastebin.com/xvMZris0 > >> > > > 3. http://pastebin.com/PkgMrsdx > >> > > > > >> > > > > >> > > > The bsp master log http://pastebin.com/0uQYP03B > >> > > > > >> > > > > >> > > > The groom log http://pastebin.com/GYY9sUEv > >> > > > > >> > > > Can you please let me know my mistake. > >> > > > > >> > > > -- > >> > > > thanks and regards, > >> > > > > >> > > > Apurv Verma > >> > > > India > >> > > > > >> > > > >> > > > >> > > > >> > > -- > >> > > Thomas Jungblut > >> > > Berlin <[email protected]> > >> > > > >> > > >> > >> > >> > >> -- > >> Thomas Jungblut > >> Berlin <[email protected]> > >> > > > > > -- Thomas Jungblut Berlin <[email protected]>
