Package com.mapr.cli

Class SnapshotCommands

  • All Implemented Interfaces:
    ListIterator, com.mapr.cliframework.base.CLIInterface

    public class SnapshotCommands
    extends ListCommand
    implements com.mapr.cliframework.base.CLIInterface
    • 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.SnapshotListRequest buildNextRequest​(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.CommandOutput executeRealCommand()  
      boolean hasMore​(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.
      void processResponse​(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.SnapshotListResponse sendRequest​(com.google.protobuf.MessageLite request)
      Send the request using RPC and fetch the response.
      • Methods inherited from class com.mapr.cliframework.base.CLIBaseClass

        executeCommand, executeSimpleSHHCommand, executeSimpleSHHCommand, getCLICommand, getCommandUsage, getGIds, getInput, getKeyType, getParamBooleanValue, getParamDateValue, getParamIntValue, getParamLongValue, getParamObjectValue, getParamTextValue, getUserCredentials, getUserId, getUserLoginId, getVersion, isParamPresent, isParamValueEmpty, setServerCall, setUserCredentials, setVersion, validateInput
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.mapr.cliframework.base.CLIInterface

        executeCommand, getCLICommand, getGIds, getUserId, getUserLoginId, setServerCall, setUserCredentials, setVersion, 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
      • 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_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
      • 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
    • Constructor Detail

      • SnapshotCommands

        public SnapshotCommands​(com.mapr.cliframework.base.ProcessedInput input,
                                com.mapr.cliframework.base.CLICommand cliCommand)
                         throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
    • Method Detail

      • 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
      • 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.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
      • processResponse

        public void processResponse​(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out,
                                    com.google.protobuf.MessageLite response)
                             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
        response - - 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.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:
        request - - request object.
        Returns:
        - the response object.
        Throws:
        com.mapr.cliframework.base.CLIProcessingException