you'd have to show us the code in the compute method. your problem might be caused by object reusal.
On Fri, Aug 9, 2013 at 9:05 PM, Kyle Orlando <[email protected]>wrote: > Hello, > > I am trying to write code to compute the local clustering coefficient > of a vertex/some vertices, and to do this I send a message that > contains a list of the source's neighbors to each of its neighbors. > This is in, of course, an IntArrayListWritable. I check the list that > I am sending before invoking sendMessage(), and it appears to be > correct. However, when I use message.iterator.next() or something > similar, the IntArrayListWritable objects seem to repeat or something. > I did some logging, and here was the output: > > SUPERSTEP 0 > ------------------------------ > Vertex 1 sends [2, 3, 4] to Vertex 2 > Vertex 1 sends [2, 3, 4] to Vertex 3 > Vertex 1 sends [2, 3, 4] to Vertex 4 > > SUPERSTEP 1 > ------------------------------ > Vertex 2 receives [2, 3, 4] > Vertex 2 sends [1] to Vertex 1 > > SUPERSTEP 1 > ------------------------------ > Vertex 3 receives [2, 3, 4, 2, 3, 4] > Vertex 3 sends [1] to Vertex 1 > > SUPERSTEP 1 > ------------------------------ > Vertex 4 receives [2, 3, 4, 2, 3, 4, 2, 3, 4] > Vertex 4 sends [0] to Vertex 1 > > SUPERSTEP 2 > ------------------------------ > Message 1 contains: [1] > Message 2 contains: [1, 1, 1] > Message 3 contains: [1, 1, 1, 1, 1, 0] > > What is happening? > > -- > Kyle Orlando > Computer Engineering Major > University of Maryland > -- Claudio Martella [email protected]
