As a side note it would be nice if it were possible to just switch to another bucket rather than ‘shutdown’ and reconnect.
I see in the example (Java SDK) that a client is created like:
client = new CouchbaseClient(uris, “default”, “”);
This uses the “default” bucket. But what if the “default” bucket doesn’t exist? How is a bucket created? How do you detect if the bucket exists? How is it removed? How are properties of the bucket modified?
So you have many ways to create buckets:
- Using the Web Console
- All the operation you do in the Web Console are available as REST API, documentation of this API is available here
- You can do this using the ClusterManager class in Java. Take a look to this test that is a good starting point for this: