giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luo <>
Subject Re:Re: Re: About aggregator's input data type and output data type
Date Thu, 16 Jan 2014 04:17:10 GMT
I' ll try it , thanks a lot.

At 2014-01-13 00:02:28,"Young Han" <> wrote:


Another workaround is to use an abstract class as A and then implement it concretely in the
two ways you need it.

If I'm not mistaken, aggregators are the recommended way to communicate between master.compute()
and (worker's) vertex.compute() in Giraph. I personally don't know if it's the *only* way.


On Sun, Jan 12, 2014 at 5:30 AM, Luo <> wrote:

Hi,  Young
That is a choice.  
But  I just want transform A or B when each vertex computing , now I need transform A and
B.  And in my program, the  A and B are both somehow large. 
Is there another way to share global variable between each vertex beside getAggregatedValue()
thanks a lot !


At 2014-01-11 01:17:21,"Young Han" <> wrote:


One way, though not a very clean way, would be to create an object that encapsulates what
you want to store in A and B. So, say you want A to be a DoubleWritable and B to be a Writable
object with two integers. Then you could just create a Writable object having three fields:
double, int, int. You'll have to implement a custom Writable class, but you won't need a special


On Fri, Jan 10, 2014 at 2:54 AM, Luo <> wrote:

hi all:
org.apache.giraph.aggregators has these tow methods:
 void aggregate(A value)
  A   getAggregatedValue() 

Now I want to use  aggregate()  in vertex_program to send value of type A for global aggregating,
I want the output of custom aggregator  is  type B .

that is to say ,  
void aggregate(A value)
  B   getAggregatedValue()

Is there any idea for this? 
Thank a lot !


View raw message