Package com.mapr.cli

Class TierCommands

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

    public class TierCommands
    extends ListCommand
    implements com.mapr.cliframework.base.CLIInterface
    • Constructor Summary

      Constructors 
      Constructor Description
      TierCommands​(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.mapr.fs.cldb.proto.CLDBProto.TierListRequest buildNextRequest​(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp)
      Builds the next request object by inspecting the previous request and previous response.
      static com.mapr.fs.cldb.proto.CLDBProto.TierRemoveResponse deleteTierFromCLDB​(java.lang.String tierName, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String cluster)  
      static com.mapr.fs.cldb.proto.CLDBProto.TierCreateResponse EcTierCreate​(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String userLoginId, java.lang.String tierName)  
      com.mapr.cliframework.base.CommandOutput executeRealCommand()  
      static java.lang.String generateTierNameForAutoCreate​(java.lang.String ecVolumeName)  
      java.lang.String getMetaVolumeTopology​(java.lang.String metaVolumeName)  
      com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType getObjectStoreType​(java.lang.String objectStoreType)  
      java.lang.String getObjectTypeString​(com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType objStore)  
      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.TierListResponse sendRequest​(com.google.protobuf.MessageLite request)
      Send the request using RPC and fetch the response.
      static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup​(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, int tierId)  
      static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup​(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String tierName)  
      static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup​(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String tierName, int tierId)  
      static int tierRemove​(java.lang.String tierName, java.lang.String cluster, java.lang.String userId, com.mapr.fs.proto.Security.CredentialsMsg creds, boolean isServerCall)  
      • Methods inherited from class com.mapr.cliframework.base.CLIBaseClass

        executeCommand, executeSimpleSHHCommand, executeSimpleSHHCommand, 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
      • 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, setUserCredentialsByJwt, setVersion, validateInput
    • Field Detail

      • TIERNAME_PARAM_NAME

        public static final java.lang.String TIERNAME_PARAM_NAME
        See Also:
        Constant Field Values
      • OBJSIZE_PARAM_NAME

        public static final java.lang.String OBJSIZE_PARAM_NAME
        See Also:
        Constant Field Values
      • THROTTLING_PARAM_NAME

        public static final java.lang.String THROTTLING_PARAM_NAME
        See Also:
        Constant Field Values
      • OUTPUT_PARAM_NAME

        public static final java.lang.String OUTPUT_PARAM_NAME
        See Also:
        Constant Field Values
      • OBJECT_STORE_TYPE_PARAM_NAME

        public static final java.lang.String OBJECT_STORE_TYPE_PARAM_NAME
        See Also:
        Constant Field Values
      • CRED_STR_PARAM_NAME

        public static final java.lang.String CRED_STR_PARAM_NAME
        See Also:
        Constant Field Values
      • DB_TOPOLOGY_PARAM_NAME

        public static final java.lang.String DB_TOPOLOGY_PARAM_NAME
        See Also:
        Constant Field Values
      • MAX_CREDENTIALS_FILE_SIZE

        public static final int MAX_CREDENTIALS_FILE_SIZE
        See Also:
        Constant Field Values
      • CREDENTIALS_ACCESS_KEY

        public static final java.lang.String CREDENTIALS_ACCESS_KEY
        See Also:
        Constant Field Values
      • CREDENTIALS_SECRET_KEY

        public static final java.lang.String CREDENTIALS_SECRET_KEY
        See Also:
        Constant Field Values
      • SORTBY_PARAM_NAME

        public static final java.lang.String SORTBY_PARAM_NAME
        See Also:
        Constant Field Values
      • SORTING_ORDER_PARAM_NAME

        public static final java.lang.String SORTING_ORDER_PARAM_NAME
        See Also:
        Constant Field Values
      • ASCENDING_SORTING_ORDER_PARAM_NAME

        public static final java.lang.String ASCENDING_SORTING_ORDER_PARAM_NAME
        See Also:
        Constant Field Values
      • DESCENDING_SORTING_ORDER_PARAM_NAME

        public static final java.lang.String DESCENDING_SORTING_ORDER_PARAM_NAME
        See Also:
        Constant Field Values
      • RW_TIER_PARAM_FORCE

        public static final java.lang.String RW_TIER_PARAM_FORCE
        See Also:
        Constant Field Values
      • metaVolumePrefix

        public static final java.lang.String metaVolumePrefix
        See Also:
        Constant Field Values
      • metaVolumeParentDir

        public static final java.lang.String metaVolumeParentDir
        See Also:
        Constant Field Values
      • autoECMetaVolumeParentDir

        public static final java.lang.String autoECMetaVolumeParentDir
        See Also:
        Constant Field Values
      • baseParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> baseParams
      • tierCreateParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> tierCreateParams
      • tierModifyParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> tierModifyParams
      • tierCommands

        public static final com.mapr.cliframework.base.CLICommand tierCommands
    • Constructor Detail

      • TierCommands

        public TierCommands​(com.mapr.cliframework.base.ProcessedInput input,
                            com.mapr.cliframework.base.CLICommand cliCommand)
    • 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
      • generateTierNameForAutoCreate

        public static java.lang.String generateTierNameForAutoCreate​(java.lang.String ecVolumeName)
      • tierLookup

        public static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup​(java.lang.String cluster,
                                                                                     com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                     int tierId)
                                                                              throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • tierLookup

        public static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup​(java.lang.String cluster,
                                                                                     com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                     java.lang.String tierName)
                                                                              throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • tierLookup

        public static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup​(java.lang.String cluster,
                                                                                     com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                     java.lang.String tierName,
                                                                                     int tierId)
                                                                              throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • EcTierCreate

        public static com.mapr.fs.cldb.proto.CLDBProto.TierCreateResponse EcTierCreate​(java.lang.String cluster,
                                                                                       com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                       java.lang.String userLoginId,
                                                                                       java.lang.String tierName)
                                                                                throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • tierRemove

        public static int tierRemove​(java.lang.String tierName,
                                     java.lang.String cluster,
                                     java.lang.String userId,
                                     com.mapr.fs.proto.Security.CredentialsMsg creds,
                                     boolean isServerCall)
                              throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • deleteTierFromCLDB

        public static com.mapr.fs.cldb.proto.CLDBProto.TierRemoveResponse deleteTierFromCLDB​(java.lang.String tierName,
                                                                                             com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                             java.lang.String cluster)
                                                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • buildNextRequest

        public com.mapr.fs.cldb.proto.CLDBProto.TierListRequest 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
      • getMetaVolumeTopology

        public java.lang.String getMetaVolumeTopology​(java.lang.String metaVolumeName)
      • 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.TierListResponse 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
      • getObjectTypeString

        public java.lang.String getObjectTypeString​(com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType objStore)
      • getObjectStoreType

        public com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType getObjectStoreType​(java.lang.String objectStoreType)