Listing keys again

Daniel Iwan iwan.daniel at
Thu Oct 11 12:35:57 EDT 2012

I hope someone could shed some light on this issue

Part of our dev code is using Java RiakClient like this

KeySource fetched = getRiakClient().listKeys(bucket);
while (fetched.hasNext()) {

where getRiakClient() returns instance of com.basho.riak.pbc.RiakClient

Aside of not using IRiakClient this lists keys in all keyspace and
filters them to get those falling into the bucket.
We are using Riak 1.2 and Riak client 1.0.5 and LevelDB

Now, I'm trying to see how this listing (which is done only when
machine boots) behaves when there is lots of keys in Riak
I load some keys into it - 100k per node (3 servers) and I'm rebooting
nodes to see what's the loading time.
Surprisingly it's always under 50ms per bucket (I have dozen of those)

Is there some automatic 2i creation to speed up listing keys or
something? Some improvements in 1.2?
Or is Riak is that quick and I should expect to fall apart on listing
keys once I reach certain number of keys in Riak?
Or is there other explanation for this?

It is quite a surprise especially that as far as I know Riak client
still have some features missing (native support of 2i?)


More information about the riak-users mailing list