accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Count RowIDs with a common Prefix
Date Tue, 18 Oct 2016 14:05:08 GMT
+1 to what Dylan said.

The naive approach would be to run a scan from [rowID:,rowID;), parse 
out the otherID and count them. The iterator approach Dylan suggested 
would push this work to the TabletServer which would likely result in a 
much more efficient computation.

Dylan Hutchison wrote:
> Write an iterator to compute partial sums. Make sure the iterator does
> not return a key outside if the range to which it was seeked. (You don't
> have to modify the keys you return; just sum the keys below the first
> one for each key prefix into the first one.)
>
> Collect the partial sums at the client from the batch scan. Compute full
> sums at the client.
>
>
> On Oct 17, 2016 11:02 PM, "Yamini Joshi" <yamini.1691@gmail.com
> <mailto:yamini.1691@gmail.com>> wrote:
>
>     Hello all
>
>     My keys are of the form rowID:otherID where there are multiple
>     otherIDs for a RowID. I want to know the count of all the otherIDs
>     within a rowID. What would be the most optimal way to implement this?
>
>     Best regards,
>     Yamini Joshi
>

Mime
View raw message