You could try setting the incremented value for the vertex in the current superstep to get the correct value in the next one. May be that could help.

Namesh Kher

On 22 Jul 2015 11:21, "Kai Schlegel" <kai.schlegel@googlemail.com> wrote:
Hi everybody,

I encounter a strange behaviour in my Apache Giraph implementations.

In my computation I want to update a counter in my vertex data object. But in the end or even in the next superstep the counter is always zero. Do I forget something simple? Do I have to manually update the vertex value object?

Simple Example: 

>> In compute:
...
MyVertextData vertexValue = vertex.getValue();
vertextvalue.increaseCounter();

<<

>> MyVertextData.class
private Integer counter = 0;

 @Override
public void write(DataOutput out) throws IOException {
    out.writeInt(this.counter);
}

@Override
public void readFields(DataInput in) throws IOException {
    this.counter = in.readInt()
}

public void increaseCounter() {
    this.counter = this.counter + 1;
}
<<

Thank you in advance!

Greetings!
_____________________________  
Kai Schlegel (M.Sc.)  

Chair of Distributed and Multimedia Information Systems (Prof. Kosch)  
University of Passau  
Innstr. 43  
94032 Passau  

Room 248 ITZ  

Tel.: +49 851 509 3063   
Fax: +49 851 509 3062   

schlegel@dimis.fim.uni-passau.de
http://www.dimis.fim.uni-passau.de
https://www.xing.com/profile/Kai_Schlegel5   
_____________________________