You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Panagiotis Eustratiadis <ep...@gmail.com> on 2015/05/22 15:46:55 UTC

Persistent aggregator resets value to 0 after each superstep

Hello everyone,

A little while ago, there was this thread Puneet started:
http://mail-archives.apache.org/mod_mbox/giraph-user/201411.mbox/%3C1540761704.525265.1416119825974.JavaMail.yahoo%40jws10738.mail.gq1.yahoo.com%3E

Unfortunately, it is not helping me. What I encounter is this:

I have a custom MasterCompute class that overrides the initialize method as
such:

@Override
public void initialize() throws InstantiationException,
IllegalAccessException {
    registerPersistentAggregator(COMPUTATION_PHASE_AGGREGATOR,
IntOverwriteAggregator.class);
}

where COMPUTATION_PHASE_AGGREGATOR is a String constant. Then, inside the
compute method of my MasterCompute class I change the value of this
aggregator with the statement:

if (getSuperstep() == 0) {
    setAggregatedValue(COMPUTATION_PHASE_AGGREGATOR, new IntWritable(-1));
}

As a result, in the following supersteps I expect the value of this
aggregator to be -1. But when I print the value using a logger, it's 0. I
experimented a bit, calling the setAggregatedValue() method in many places,
and I came to the conclusion that after each superstep it resets to 0.
Which does not make sense to me, because of the whole point of a persistent
aggregator.

I am using giraph v1.1.0-hadoop2. I appreciate any help.
Regards,
Panagiotis Eustratiadis.

Re: Persistent aggregator resets value to 0 after each superstep

Posted by Panagiotis Eustratiadis <ep...@gmail.com>.
Hello everyone,

I still haven't found a way around it. Is it a bug of that particular
release? Can anyone reproduce it for confirmation?

Regards,
Panagiotis Eustratiadis.


On 22 May 2015 at 16:46, Panagiotis Eustratiadis <ep...@gmail.com>
wrote:

> Hello everyone,
>
> A little while ago, there was this thread Puneet started:
>
> http://mail-archives.apache.org/mod_mbox/giraph-user/201411.mbox/%3C1540761704.525265.1416119825974.JavaMail.yahoo%40jws10738.mail.gq1.yahoo.com%3E
>
> Unfortunately, it is not helping me. What I encounter is this:
>
> I have a custom MasterCompute class that overrides the initialize method
> as such:
>
> @Override
> public void initialize() throws InstantiationException,
> IllegalAccessException {
>     registerPersistentAggregator(COMPUTATION_PHASE_AGGREGATOR,
> IntOverwriteAggregator.class);
> }
>
> where COMPUTATION_PHASE_AGGREGATOR is a String constant. Then, inside the
> compute method of my MasterCompute class I change the value of this
> aggregator with the statement:
>
> if (getSuperstep() == 0) {
>     setAggregatedValue(COMPUTATION_PHASE_AGGREGATOR, new IntWritable(-1));
> }
>
> As a result, in the following supersteps I expect the value of this
> aggregator to be -1. But when I print the value using a logger, it's 0. I
> experimented a bit, calling the setAggregatedValue() method in many places,
> and I came to the conclusion that after each superstep it resets to 0.
> Which does not make sense to me, because of the whole point of a persistent
> aggregator.
>
> I am using giraph v1.1.0-hadoop2. I appreciate any help.
> Regards,
> Panagiotis Eustratiadis.
>
>