Hi, 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 aggregator.
Young On Fri, Jan 10, 2014 at 2:54 AM, Luo <luo...@163.com> wrote: > hi all: > org.apache.giraph.aggregators has these tow methods: void > aggregate<http://giraph.apache.org/giraph-core/apidocs/org/apache/giraph/aggregators/Aggregator.html#aggregate(A)> > (A<http://giraph.apache.org/giraph-core/apidocs/org/apache/giraph/aggregators/Aggregator.html> > value) > A > getAggregatedValue<http://giraph.apache.org/giraph-core/apidocs/org/apache/giraph/aggregators/Aggregator.html#getAggregatedValue()> > () > > > Now I want to use aggregate() in vertex_program to send value of type A > for global aggregating, however, > 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 ! > > > ======================== > Luo > > >