Actually, I think it's less efficient (more data sent over the wire) – but
happens to be faster. The client is simply buffering key lengths from a
chunked response, which happens to be way faster than supplying keys=true.
I haven't looked at how this is implemented in Riak.
2011/11/24 Soren Hanse
2011/11/24 Stephen Bennett :
> This is an extremely efficient way of counting the size of the bucket.
Perhaps I missed it. What does it do that makes it extremely
efficient? Are you perhaps just speaking in terms of lines of code? Or
does the riak-js library do fancy things in the .count() method?
Thanks.
This is an extremely efficient way of counting the size of the bucket.
On 22 November 2011 15:23, francisco treacy wrote:
> I would probably stream keys to the client and count them there (it's the
> most efficient method I can think of)
>
> If you have node.js installed, do this:
>
> np
I would probably stream keys to the client and count them there (it's the
most efficient method I can think of)
If you have node.js installed, do this:
npm install riak-js@latest
node -e "require('riak-js').getClient({ port: 8098 }).count('bucket');"
2011/11/21 Stephen Bennett
> I have a buck
This depends on what riak version (1.x.x) and backend storage you're
using 2i indexes are supported by eleveldb ( bitcask is default), but
you can just specify inputs w/ key filters or just a bucket name,
i.e
"inputs": "yourbucket", or "inputs":{
"bucket":"yourbucket",
"key_filters":[["e
Thanks for that. I've tried to run this across my cluster but it just
returns an error message. Do I need to include a key filter as well?
An error occurred parsing the "inputs" field.
Key filter expression missing filter list.
On 22 November 2011 08:42, Fyodor Yarochkin wrote:
> You can t
You can try to limit input by particular subset of ranges, if that
helps. Here's my count m-r snippet:
{
"inputs":{
"bucket":"data",
"index":"numero_int",
"start":0,
"end":1212
},
"query":[
{"map":
{"language":"erlang","module":"riak_kv_mapreduce","functio