On the site https://github.com/basho/riak-java-client I see the sample quick
start:
// create a client (see Configuration below in this README for more details)
IRiakClient riakClient = RiakFactory.pbcClient(); //or
RiakFactory.httpClient();
// create a new bucket
Bucket myBucket = riakClient.createBucket("myBucket").execute();
// add data to the bucket
myBucket.store("key1", "value1").execute();
//fetch it back
IRiakObject myData = myBucket.fetch("key1").execute();
// you can specify extra parameters to the store operation using the
// fluent builder style API
myData = myBucket.store("key1", "value2").returnBody(true).execute();
// delete
myBucket.delete("key1").rw(3).execute();
This sample calls 'createBucket'. First what is the difference between
'createBucket' and 'fetchBucket'? I have an existing bucket so I don't want
to create a new one and thereby remove the old one. So I felt that
'fetchBucket' would be the call I should make. The problem is that
'fetchBucket' returns a 'FetchBucket' object that doesn't have the same
methods as the 'Bucket' returned by createBucket. I would just like to query
the bucket using a key. But that simple operation appears to be unavailable
with the 'FetchBucket' object. Ideas?
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com