+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.1...@gmail.com
<mailto:yamini.1...@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

Reply via email to