You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
broach edited this page Mar 26, 2012
·
6 revisions
Creating or modifying a bucket in Riak
riakClient = RiakFactory.httpClient();
// If the bucket does not exist in Riak, it will be created with the default properties// when you use the fetchBucket() method.BucketmyBucket = riakClient.fetchBucket("TestBucket").execute();
// By using the createBucket() method you can specify properties' values. If the bucket// already exists in Riak the bucket properties will be updated.BucketmyOtherBucket = riakClient.createBucket("TestBucket").nVal(2).r(1).execute();
// If you have an existing Bucket object, you can modify the values and update RiakBucketexistingBucket = riakClient.fetchBucket("TestBucket").execute();
existingBucket = riakClient.updateBucket(existingBucket).nVal(3).r(2).execute();