listkeys

Andy Gross andy at basho.com
Mon Nov 1 02:12:15 EDT 2010


Hi Andrea,

You're right - listing buckets in the PB client could be easier.   We're in
the process of merging the currently-supported Java client and Kresten's PB
client.   In the meantime, it looks like you'll need to manually construct
the ByteString argument to listKeys:

String bucketName = "myBucket";
ByteString bucket = ByteString.copyFromUtf8(bucketName);
this.rc.listKeys(bucket);

- Andy


On Fri, Oct 29, 2010 at 1:27 PM, Andrea Campolonghi
<acampolonghi at gmail.com>wrote:

> Hi,
>
> I am using http://github.com/krestenkrab/riak-java-pb-client and I cannot
> find a way to get info about a specifc bucket and/or keys.
>
> I am looking something like .
>
>  bucket = client.getBucket();
>
> keys = bucket.getKeys();
>
> What I can is to output the whole riak object tree like this :
>
> ByteString[] buckets = this.rc.listBuckets();
>
> for(ByteString bucket : buckets){
>
> KeySource keys = this.rc.listKeys(bucket);
>
> }
>
>
> but this is completely unuseful if I cannot say I want keys for THIS bucket
> etc...
>
>
> Any suggestion?
>
>
>
>
> --
> Andrea Campolonghi
>
> Cell : +39 347 2298435
> andrea at andreacfm.com
> http://www.andreacfm.com
>
> Railo Team
> andrea at getrailo.org
> http://getrailo.org
>
>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20101031/1ad65d74/attachment.html>


More information about the riak-users mailing list