Package com.mapr.cli

Class OchInstanceCommands

java.lang.Object
com.mapr.cliframework.base.CLIBaseClass
com.mapr.cli.common.ListCommand
com.mapr.cli.OchInstanceCommands
All Implemented Interfaces:
ListIterator, com.mapr.cliframework.base.CLIInterface

public class OchInstanceCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
maprcli och-instance commands. Usage: maprcli och-instance create -name <n> [-node <fqdn>] [-sticky true|false] -isSQSListener true|false [-enableMultipart true|false] [-multipartThreshold <bytes>] [-multipartSize <bytes>] [-multipartConcurrency <n>] [-isAuditEnabled true|false] [-sqsQueueUrl <url>] [-sqsAwsRegion <r>] [-sqsAwsAccessKey <k>] [-sqsAwsSecretKey <s>] [-sqsAwsSessionToken <t>] [-sqsRoleArn <arn>] [-kafkaTopics <t1,t2>] [-srcIsAWS true|false] [-srcAwsRegion <r>] [-srcAwsAccessKey <k>] [-srcAwsSecretKey <s>] [-srcAwsSessionToken <t>] [-srcRoleArn <arn>] [-srcAccessKey <k>] [-srcSecretKey <s>] [-srcEndpoint <url>] [-srcChainCA <path>] [-dstAccessKey <k>] [-dstSecretKey <s>] [-dstEndpoint <url>] [-dstChainCA <path>] [-bucketMap <src1:dst1,src2:dst2:/path/rules2.json>] maprcli och-instance delete -name <n> maprcli och-instance update -name <n> [any subset of the create inputs] (partial: anything not passed keeps its stored value; placement and run state are always preserved) maprcli och-instance move -name <n> -node <fqdn> (graceful handoff: the copier is stopped on its current node and only reassigned once that node confirms it is no longer running there) maprcli och-instance start -name <n> maprcli och-instance stop -name <n> maprcli och-instance list maprcli och-instance info -name <n> maprcli och-instance add-buckets -name <n> -srcbucket <s> -dstbucket <d> [-rulesFile <path>] maprcli och-instance delete-buckets -name <n> -srcbucket <s> maprcli och-instance stats [-name <n>] create, update and add-buckets also accept the hidden -isContentInline true|false (default false). When set, every argument that normally names a file carries that file's contents instead: -srcChainCA/-dstChainCA hold the PEM chain, and the rules arguments (-bucketMap's third field, -rulesFile) hold the marshalled rules JSON. It exists for the UI, which has the certificate and the rules document in hand but no path on the cluster to name them by. Every sub-command answers in the same shape as the rest of maprcli: a "data" array of records that lead with "name", with related settings grouped into nested objects the way 'volume info' reports "acl" and "volumeAces".
  • Field Details

  • Constructor Details

    • OchInstanceCommands

      public OchInstanceCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand)
  • Method Details

    • validateInput

      public boolean validateInput() throws IllegalArgumentException
      Always claims the input is valid so the driver never swallows the real problem: on a false return CLIMainDriver discards the OutputErrors validation produced (e.g. "Value is required, but is missing for parameter: bucketMap") and dumps the whole usage tree instead (MFS-23866). The failure is remembered and surfaced from executeRealCommand(). Validation runs once — the framework calls this from both the driver and executeCommand(), and a second super call would duplicate the errors.
      Specified by:
      validateInput in interface com.mapr.cliframework.base.CLIInterface
      Overrides:
      validateInput in class com.mapr.cliframework.base.CLIBaseClass
      Throws:
      IllegalArgumentException
    • executeRealCommand

      public com.mapr.cliframework.base.CommandOutput executeRealCommand() throws com.mapr.cliframework.base.CLIProcessingException
      Specified by:
      executeRealCommand in class com.mapr.cliframework.base.CLIBaseClass
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • sendRequest

      public com.google.protobuf.MessageLite sendRequest(com.google.protobuf.MessageLite req) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Send the request using RPC and fetch the response.
      Specified by:
      sendRequest in interface ListIterator
      Specified by:
      sendRequest in class ListCommand
      Parameters:
      req - - request object.
      Returns:
      - the response object.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • processResponse

      public void processResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite resp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Parse the response and populate the output hierarchy.
      Specified by:
      processResponse in interface ListIterator
      Specified by:
      processResponse in class ListCommand
      Parameters:
      out - - CommandOutput.OutputHierarchy
      resp - - response object
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • buildNextRequest

      public com.google.protobuf.MessageLite buildNextRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Builds the next request object by inspecting the previous request and previous response.
      Specified by:
      buildNextRequest in interface ListIterator
      Specified by:
      buildNextRequest in class ListCommand
      Returns:
      - new request object
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • hasMore

      public boolean hasMore(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Inspect the last request and last response to see if there are more records to be fetched.
      Specified by:
      hasMore in interface ListIterator
      Specified by:
      hasMore in class ListCommand
      Returns:
      - true, if there are more records. false, if no more.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException