brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bostko <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Riak - Create Bucket type effecto...
Date Tue, 07 Apr 2015 11:28:30 GMT
Github user bostko commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/581#discussion_r27869514
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
---
    @@ -474,6 +463,79 @@ public void commitCluster() {
         }
     
         @Override
    +    public void bucketTypeCreate(String bucketTypeName, String bucketTypeProperties)
{
    +        ScriptHelper bucketTypeCreateScript = newScript("bucket-type_create " + bucketTypeName)
    +                .body.append(sudo(format("%s bucket-type create %s %s",
    +                        getRiakAdminCmd(),
    +                        bucketTypeName,
    +                        escapeLiteralForDoubleQuotedBash(bucketTypeProperties))));
    +        if(!isRiakOnPath()) {
    +            addRiakOnPath(bucketTypeCreateScript);
    +        }
    +        bucketTypeCreateScript.body.append(sudo(format("%s bucket-type activate %s",
getRiakAdminCmd(), bucketTypeName)))
    +                .failOnNonZeroResultCode();
    +
    +        bucketTypeCreateScript.execute();
    +    }
    +
    +    @Override
    +    public List<String> bucketTypeList() {
    +        ScriptHelper bucketTypeListScript = newScript("bucket-types_list")
    +                .body.append(sudo(format("%s bucket-type list", getRiakAdminCmd())))
    +                .gatherOutput()
    +                .noExtraOutput()
    +                .failOnNonZeroResultCode();
    +        if (!isRiakOnPath()) {
    +            addRiakOnPath(bucketTypeListScript);
    +        }
    +        bucketTypeListScript.execute();
    +        String stdout = bucketTypeListScript.getResultStdout();
    +        return Arrays.asList(stdout.split("[\\r\\n]+"));
    +    }
    +
    +    @Override
    +    public List<String> bucketTypeStatus(String bucketTypeName) {
    +        ScriptHelper bucketTypeStatusScript = newScript("bucket-type_status")
    +                .body.append(sudo(format("%s bucket-type status %s", getRiakAdminCmd(),
bucketTypeName)))
    +                .gatherOutput()
    +                .noExtraOutput()
    +                .failOnNonZeroResultCode();
    +        if (!isRiakOnPath()) {
    +            addRiakOnPath(bucketTypeStatusScript);
    +        }
    +        bucketTypeStatusScript.execute();
    +        String stdout = bucketTypeStatusScript.getResultStdout();
    +        return Arrays.asList(stdout.split("[\\r\\n]+"));
    +    }
    +
    +    @Override
    +    public void bucketTypeUpdate(String bucketTypeName, String bucketTypeProperties)
{
    +        ScriptHelper bucketTypeStatusScript = newScript("bucket-type_update")
    +                .body.append(sudo(format("%s bucket-type update %s %s",
    +                        getRiakAdminCmd(),
    +                        bucketTypeName,
    +                        escapeLiteralForDoubleQuotedBash(bucketTypeProperties))))
    +                .noExtraOutput()
    --- End diff --
    
    You are right


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message