private void addBucket ( String name ) { String qouta = csmd . getBucketProperty ( "bucket.quota" ) ; int bucketQuota = qouta != null ? Integer . parseInt ( qouta ) : DEFAULT_RAM_SIZE_IN_MB ; BucketSettings bucketSettings = new DefaultBucketSettings . Builder ( ) . type ( BucketType . COUCHBASE ) . name ( name ) . quota ( bucketQuota ) . build ( ) ; try { clusterManager . insertBucket ( bucketSettings ) ; LOGGER . info ( "Bucket [" + name + "] is added!" ) ; } catch ( CouchbaseException ex ) { LOGGER . error ( "Not able to add bucket [" + name + "]." , ex ) ; throw new KunderaException ( "Not able to add bucket [" + name + "]." , ex ) ; } }
Adds the bucket .