Github user ZaidM commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/25#discussion_r14664169
  
    --- Diff: 
software/nosql/src/main/java/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
 ---
    @@ -315,6 +341,81 @@ public boolean isMemberInCluster(Entity e) {
             return 
Optional.fromNullable(e.getAttribute(CouchbaseNode.IS_IN_CLUSTER)).or(false);
         }
         
    +    public void createBuckets() {
    +        //FIXME: multiple buckets require synchronization/wait time 
(checks for port conflicts and exceeding ram size)
    +        //TODO: check for multiple bucket conflicts with port
    +        List<Map<String, Object>> bucketsToCreate = 
getConfig(CREATE_BUCKETS);
    +        Entity primaryNode = getPrimaryNode();
    +
    +        for (Map<String, Object> bucketMap : bucketsToCreate) {
    +            String bucketName = bucketMap.containsKey("bucket") ? (String) 
bucketMap.get("bucket") : "default";
    +            String bucketType = bucketMap.containsKey("bucket-type") ? 
(String) bucketMap.get("bucket-type") : "couchbase";
    +            Integer bucketPort = bucketMap.containsKey("bucket-port") ? 
(Integer) bucketMap.get("bucket-port") : 11222;
    +            Integer bucketRamSize = 
bucketMap.containsKey("bucket-ramsize") ? (Integer) 
bucketMap.get("bucket-ramsize") : 200;
    +            Integer bucketReplica = 
bucketMap.containsKey("bucket-replica") ? (Integer) 
bucketMap.get("bucket-replica") : 1;
    +
    +            log.info("adding bucket: {} to primary node: {}", bucketName, 
primaryNode.getId());
    +            createBucket(primaryNode, bucketName, bucketType, bucketPort, 
bucketRamSize, bucketReplica);
    +            //TODO: add if bucket has been created.
    --- End diff --
    
    probably to be added to a list of buckets that are online/active.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to