Package com.mapr.cli
Class SnapshotCommands
- java.lang.Object
-
- com.mapr.cliframework.base.CLIBaseClass
-
- com.mapr.cli.common.ListCommand
-
- com.mapr.cli.SnapshotCommands
-
- All Implemented Interfaces:
ListIterator,com.mapr.cliframework.base.CLIInterface
public class SnapshotCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOLUMNS_PARAM_NAMEstatic java.lang.StringFILTER_PARAM_NAMEstatic java.lang.StringFORCE_RESTOREcom.mapr.baseutils.fsrpcutils.FSRpcUtilsfsRpcUtilsstatic java.lang.StringINCLUDE_MARKEDFOR_DELETE_PARAM_NAMEstatic java.lang.StringLIMIT_PARAM_NAMEstatic java.lang.StringOUTPUT_PARAM_NAMEstatic java.util.regex.Patternpstatic java.lang.StringRW_VOLUME_PARAM_MOUNTDIRstatic java.lang.StringRW_VOLUME_PARAM_NAMEstatic java.lang.StringSIZEUPDATE_DELAY_PARAMstatic java.lang.StringSIZEUPDATE_ID_PARAMstatic java.lang.StringSNAPSHOT_EXPIRY_PARAM_NAMEstatic java.lang.StringSNAPSHOT_PARAM_NAMEstatic java.lang.StringSNAPSHOT_PARAM_VOL_NAMEstatic java.lang.StringSNAPSHOT_PARAM_VOL_PATHstatic com.mapr.cliframework.base.CLICommandsnapshotCommandsstatic com.mapr.cliframework.base.CLICommand[]snapshotCommandsArraystatic java.lang.StringsnapshotCreateUsagestatic java.lang.StringsnapshotListUsagestatic java.lang.StringsnapshotPreserveUsagestatic java.lang.StringsnapshotRemoveUsagestatic java.lang.StringsnapshotRestoreStatusUsagestatic java.lang.StringsnapshotRestoreUsagestatic java.lang.StringSNAPSHOTS_ID_PARAM_NAMEstatic java.lang.StringsnapshotSizeUpdateUsagestatic java.lang.StringSORT_DIRECTION_PARAM_NAMEstatic java.lang.StringSORT_PARAM_NAMEstatic java.lang.StringSTART_PARAM_NAMEstatic java.lang.StringVERBOSE_STATUS
-
Constructor Summary
Constructors Constructor Description SnapshotCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mapr.fs.cldb.proto.CLDBProto.SnapshotListRequestbuildNextRequest(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.CommandOutputexecuteRealCommand()booleanhasMore(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 response)Parse the response and populate the output hierarchy.com.mapr.fs.cldb.proto.CLDBProto.SnapshotListResponsesendRequest(com.google.protobuf.MessageLite request)Send the request using RPC and fetch the response.-
Methods inherited from class com.mapr.cli.common.ListCommand
getFilters, getNextLimiter, hasMore, list
-
Methods 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, skipValidation, validateInput
-
-
-
-
Field Detail
-
fsRpcUtils
public com.mapr.baseutils.fsrpcutils.FSRpcUtils fsRpcUtils
-
SNAPSHOT_PARAM_VOL_NAME
public static final java.lang.String SNAPSHOT_PARAM_VOL_NAME
- See Also:
- Constant Field Values
-
SNAPSHOT_PARAM_VOL_PATH
public static final java.lang.String SNAPSHOT_PARAM_VOL_PATH
- See Also:
- Constant Field Values
-
RW_VOLUME_PARAM_NAME
public static final java.lang.String RW_VOLUME_PARAM_NAME
- See Also:
- Constant Field Values
-
RW_VOLUME_PARAM_MOUNTDIR
public static final java.lang.String RW_VOLUME_PARAM_MOUNTDIR
- See Also:
- Constant Field Values
-
SNAPSHOT_PARAM_NAME
public static final java.lang.String SNAPSHOT_PARAM_NAME
- See Also:
- Constant Field Values
-
SNAPSHOT_EXPIRY_PARAM_NAME
public static final java.lang.String SNAPSHOT_EXPIRY_PARAM_NAME
- See Also:
- Constant Field Values
-
SNAPSHOTS_ID_PARAM_NAME
public static final java.lang.String SNAPSHOTS_ID_PARAM_NAME
- See Also:
- Constant Field Values
-
VERBOSE_STATUS
public static final java.lang.String VERBOSE_STATUS
- See Also:
- Constant Field Values
-
FORCE_RESTORE
public static final java.lang.String FORCE_RESTORE
- See Also:
- Constant Field Values
-
FILTER_PARAM_NAME
public static final java.lang.String FILTER_PARAM_NAME
- See Also:
- Constant Field Values
-
COLUMNS_PARAM_NAME
public static final java.lang.String COLUMNS_PARAM_NAME
- See Also:
- Constant Field Values
-
SORT_PARAM_NAME
public static final java.lang.String SORT_PARAM_NAME
- See Also:
- Constant Field Values
-
SORT_DIRECTION_PARAM_NAME
public static final java.lang.String SORT_DIRECTION_PARAM_NAME
- See Also:
- Constant Field Values
-
OUTPUT_PARAM_NAME
public static final java.lang.String OUTPUT_PARAM_NAME
- See Also:
- Constant Field Values
-
START_PARAM_NAME
public static final java.lang.String START_PARAM_NAME
- See Also:
- Constant Field Values
-
LIMIT_PARAM_NAME
public static final java.lang.String LIMIT_PARAM_NAME
- See Also:
- Constant Field Values
-
INCLUDE_MARKEDFOR_DELETE_PARAM_NAME
public static final java.lang.String INCLUDE_MARKEDFOR_DELETE_PARAM_NAME
- See Also:
- Constant Field Values
-
SIZEUPDATE_ID_PARAM
public static final java.lang.String SIZEUPDATE_ID_PARAM
- See Also:
- Constant Field Values
-
SIZEUPDATE_DELAY_PARAM
public static final java.lang.String SIZEUPDATE_DELAY_PARAM
- See Also:
- Constant Field Values
-
p
public static java.util.regex.Pattern p
-
snapshotListUsage
public static java.lang.String snapshotListUsage
-
snapshotCreateUsage
public static final java.lang.String snapshotCreateUsage
- See Also:
- Constant Field Values
-
snapshotRemoveUsage
public static java.lang.String snapshotRemoveUsage
-
snapshotRestoreUsage
public static java.lang.String snapshotRestoreUsage
-
snapshotRestoreStatusUsage
public static java.lang.String snapshotRestoreStatusUsage
-
snapshotPreserveUsage
public static java.lang.String snapshotPreserveUsage
-
snapshotSizeUpdateUsage
public static final java.lang.String snapshotSizeUpdateUsage
- See Also:
- Constant Field Values
-
snapshotCommandsArray
public static com.mapr.cliframework.base.CLICommand[] snapshotCommandsArray
-
snapshotCommands
public static com.mapr.cliframework.base.CLICommand snapshotCommands
-
-
Method Detail
-
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
-
buildNextRequest
public com.mapr.fs.cldb.proto.CLDBProto.SnapshotListRequest buildNextRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingExceptionDescription 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.CLIProcessingExceptionDescription 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
-
processResponse
public void processResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingExceptionDescription copied from interface:ListIteratorParse the response and populate the output hierarchy.- Specified by:
processResponsein interfaceListIterator- Specified by:
processResponsein classListCommand- Parameters:
out- -CommandOutput.OutputHierarchyresponse- - response object- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
sendRequest
public com.mapr.fs.cldb.proto.CLDBProto.SnapshotListResponse sendRequest(com.google.protobuf.MessageLite request) throws com.mapr.cliframework.base.CLIProcessingExceptionDescription copied from interface:ListIteratorSend the request using RPC and fetch the response.- Specified by:
sendRequestin interfaceListIterator- Specified by:
sendRequestin classListCommand- Parameters:
request- - request object.- Returns:
- - the response object.
- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
-