Riak key size estimation

Guido Medina guido.medina at temetra.com
Wed Sep 3 06:47:22 EDT 2014


Hi,

Is there a way to estimate the size of a Riak Key using Riak Java client 
1.4.x, say from an instance of IRiakObject?

An approximation would be OK, I can probably get the Json's string and 
check its length but then there are 4 sizes to take into account right?

 1. The Json string length.
 2. The size of the binary object sent through the network using
    protocol buffers which maybe it is compressed?
 3. The binary size before snappy compression?
 4. The binary size after snappy compression?

In our case we are only interested in the size for LevelDB back-end, we 
want to be able to predict when keys are getting close to raise a "big 
object" warning at the Riak side and be able to do something before it 
can happen, say, split the keys, redesign etc.

Best regards,

Guido.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140903/9cae676d/attachment.html>


More information about the riak-users mailing list