incubator-accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Cordova <aa...@cordovas.org>
Subject Re: upgrade from 1.3 to 1.4
Date Tue, 03 Jan 2012 17:56:58 GMT
Ahh that's awesome. So the function returns exactly one value for each key?

On Jan 3, 2012, at 12:53 PM, Billie J Rinaldi wrote:

> On Tuesday, January 3, 2012 11:56:50 AM, "Aaron Cordova" <aaron@cordovas.org> wrote:
>> BTW I love the label 'Combiner' instead of aggregator. I've been
>> describing their capabilities as equivalent to MapReduce combiners to
>> new Accumulo users, so this makes it even more clear.
>> 
>> Are they easier to code up too? It'd be sweet if one could basically
>> just define a function such as
>> 
>> public void combine(Key k, Iterator<Value> v)
>> 
>> or some such simple signature
> 
> That's basically it.  Here's the method you implement:
> public Value reduce(Key k, Iterator<Value> v);
> 
> We've also done something exciting with the TypedValueCombiner<V>.  It uses an
Encoder<V> which has decode and encode methods to translate from a Value's byte array
to type V and back.  Then you implement this method to do the combining:
> public V typedReduce(Key k, Iterator<V> v);
> 
> We provide a LongCombiner which is a TypedValueCombiner<Long> with three built-in
encoding types: STRING, VARLEN, and FIXEDLEN.  Separating the encoding from the combining
has made writing new combiners really easy.  See the MaxCombiner and MinCombiner in addition
to the SummingCombiner.
> 
> Billie


Mime
View raw message