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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommandstatic final com.mapr.cliframework.base.CLICommand[]Array registered in MapRCLIRegistry.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.mapr.cliframework.base.CLIBaseClass
cliCommand, CLUSTER_NAME_PARAM, clusterParams, HELP_PARAM, input, isServerCall, NOT_REQUIRED, output, REQUIRED, userInfo, versionFields inherited from interface com.mapr.cliframework.base.CLIInterface
KEY_PREFIX, PASSWORD_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionOchInstanceCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.MessageLitebuildNextRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) Builds the next request object by inspecting the previous request and previous response.com.mapr.cliframework.base.CommandOutputbooleanhasMore(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) Inspect the last request and last response to see if there are more records to be fetched.voidprocessResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite resp) Parse the response and populate the output hierarchy.com.google.protobuf.MessageLitesendRequest(com.google.protobuf.MessageLite req) Send the request using RPC and fetch the response.booleanAlways 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.Methods inherited from class com.mapr.cli.common.ListCommand
getFilters, getNextLimiter, hasMore, listMethods inherited from class com.mapr.cliframework.base.CLIBaseClass
executeCommand, executeSimpleSHHCommand, executeSimpleSHHCommand, getBooleanParam, getCLICommand, getCommandUsage, getGIds, getInput, getKeyType, getParamBooleanValue, getParamDateValue, getParamIntValue, getParamLongValue, getParamObjectValue, getParamTextValue, getUserClusterOps, getUserCredentials, getUserId, getUserLoginId, getVersion, isParamPresent, isParamValueEmpty, setServerCall, setUserClusterOps, setUserCredentials, setUserCredentialsByJwt, setVersion, skipValidationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mapr.cliframework.base.CLIInterface
executeCommand, getCLICommand, getGIds, getUserId, getUserLoginId, setServerCall, setUserCredentials, setUserCredentialsByJwt, setVersion
-
Field Details
-
CMD_CREATE
- See Also:
-
CMD_UPDATE
- See Also:
-
CMD_MOVE
- See Also:
-
CMD_DELETE
- See Also:
-
CMD_START
- See Also:
-
CMD_STOP
- See Also:
-
CMD_LIST
- See Also:
-
CMD_INFO
- See Also:
-
CMD_ADD_BUCKETS
- See Also:
-
CMD_DELETE_BUCKETS
- See Also:
-
CMD_STATS
- See Also:
-
PARAM_NAME
- See Also:
-
PARAM_NODE
- See Also:
-
PARAM_STICKY
- See Also:
-
PARAM_IS_SQS_LISTENER
- See Also:
-
PARAM_SQS_QUEUE_URL
- See Also:
-
PARAM_SQS_AWS_REGION
- See Also:
-
PARAM_SQS_AWS_ACCESSKEY
- See Also:
-
PARAM_SQS_AWS_SECRETKEY
- See Also:
-
PARAM_SQS_AWS_SESSIONTOKEN
- See Also:
-
PARAM_SQS_ROLE_ARN
- See Also:
-
PARAM_KAFKA_TOPICS
- See Also:
-
PARAM_SRC_IS_AWS
- See Also:
-
PARAM_SRC_AWS_REGION
- See Also:
-
PARAM_SRC_AWS_ACCESSKEY
- See Also:
-
PARAM_SRC_AWS_SECRETKEY
- See Also:
-
PARAM_SRC_AWS_SESSIONTOKEN
- See Also:
-
PARAM_SRC_ROLE_ARN
- See Also:
-
PARAM_SRC_ACCESSKEY
- See Also:
-
PARAM_SRC_SECRETKEY
- See Also:
-
PARAM_SRC_ENDPOINT
- See Also:
-
PARAM_SRC_CHAINCA
- See Also:
-
PARAM_DST_ACCESSKEY
- See Also:
-
PARAM_DST_SECRETKEY
- See Also:
-
PARAM_DST_ENDPOINT
- See Also:
-
PARAM_DST_CHAINCA
- See Also:
-
PARAM_ENABLE_MULTIPART
- See Also:
-
PARAM_MULTIPART_THRESHOLD
- See Also:
-
PARAM_MULTIPART_SIZE
- See Also:
-
PARAM_MULTIPART_CONCURRENCY
- See Also:
-
PARAM_IS_AUDIT_ENABLED
- See Also:
-
PARAM_BUCKET_MAP
- See Also:
-
PARAM_SRC_BUCKET
- See Also:
-
PARAM_DST_BUCKET
- See Also:
-
PARAM_RULES_FILE
- See Also:
-
PARAM_IS_CONTENT_INLINE
- See Also:
-
OchCopierCreateCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierCreateCommand -
OchCopierUpdateCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierUpdateCommand -
OchCopierMoveCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierMoveCommand -
OchCopierDeleteCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierDeleteCommand -
OchCopierStartCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierStartCommand -
OchCopierStopCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierStopCommand -
OchCopierListCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierListCommand -
OchCopierInfoCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierInfoCommand -
OchCopierAddBucketsCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierAddBucketsCommand -
OchCopierDeleteBucketsCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierDeleteBucketsCommand -
OchCopierStatsCommand
public static final com.mapr.cliframework.base.CLICommand OchCopierStatsCommand -
ochInstanceCommands
public static final com.mapr.cliframework.base.CLICommand[] ochInstanceCommandsArray registered in MapRCLIRegistry. -
ochInstanceCommandsUsage
- See Also:
-
-
Constructor Details
-
OchInstanceCommands
public OchInstanceCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand)
-
-
Method Details
-
validateInput
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:
validateInputin interfacecom.mapr.cliframework.base.CLIInterface- Overrides:
validateInputin classcom.mapr.cliframework.base.CLIBaseClass- Throws:
IllegalArgumentException
-
executeRealCommand
public com.mapr.cliframework.base.CommandOutput executeRealCommand() throws com.mapr.cliframework.base.CLIProcessingException- Specified by:
executeRealCommandin classcom.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:ListIteratorSend the request using RPC and fetch the response.- Specified by:
sendRequestin interfaceListIterator- Specified by:
sendRequestin classListCommand- 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:ListIteratorParse the response and populate the output hierarchy.- Specified by:
processResponsein interfaceListIterator- Specified by:
processResponsein classListCommand- Parameters:
out- -CommandOutput.OutputHierarchyresp- - 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:ListIteratorBuilds the next request object by inspecting the previous request and previous response.- Specified by:
buildNextRequestin interfaceListIterator- Specified by:
buildNextRequestin classListCommand- 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:ListIteratorInspect the last request and last response to see if there are more records to be fetched.- Specified by:
hasMorein interfaceListIterator- Specified by:
hasMorein classListCommand- Returns:
- - true, if there are more records. false, if no more.
- Throws:
com.mapr.cliframework.base.CLIProcessingException
-