Re: Count RowIDs with a common Prefix

2016-10-18 Thread Josh Elser
+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:

Re: Count RowIDs with a common Prefix

2016-10-18 Thread Dylan Hutchison
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

Count RowIDs with a common Prefix

2016-10-17 Thread Yamini Joshi
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