Package com.mapr.cli
Class TierCommands
- java.lang.Object
-
- com.mapr.cliframework.base.CLIBaseClass
-
- com.mapr.cli.common.ListCommand
-
- com.mapr.cli.TierCommands
-
- All Implemented Interfaces:
ListIterator,com.mapr.cliframework.base.CLIInterface
public class TierCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASCENDING_SORTING_ORDER_PARAM_NAMEstatic java.lang.StringAUTH_PARAM_NAMEstatic java.lang.StringautoECMetaVolumeParentDirstatic java.lang.StringAzure_Blobsstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>baseParamsstatic java.lang.StringBUCKET_NAMEstatic java.lang.StringCRED_STR_PARAM_NAMEstatic java.lang.StringCREDENTIALS_ACCESS_KEYstatic java.lang.StringCREDENTIALS_SECRET_KEYstatic java.lang.StringDB_TOPOLOGY_PARAM_NAMEstatic java.lang.StringDEFAULT_REGIONstatic java.lang.StringDESCENDING_SORTING_ORDER_PARAM_NAMEstatic intMAX_CREDENTIALS_FILE_SIZEstatic intMAX_OBJ_SIZEstatic java.lang.StringmetaVolumeParentDirstatic java.lang.StringmetaVolumePrefixstatic java.lang.StringOBJECT_STORE_TYPE_PARAM_NAMEstatic java.lang.StringOBJSIZE_PARAM_NAMEstatic java.lang.StringOUTPUT_PARAM_NAMEstatic java.lang.StringREGIONstatic java.lang.StringRW_TIER_PARAM_FORCEstatic java.lang.StringS3_AWSstatic java.lang.StringS3_GCSstatic java.lang.StringS3_HDSstatic java.lang.StringS3_IBMstatic java.lang.StringS3_Othersstatic java.lang.StringSORTBY_PARAM_NAMEstatic java.lang.StringSORTING_ORDER_PARAM_NAMEstatic java.lang.StringTHROTTLING_PARAM_NAMEstatic com.mapr.cliframework.base.CLICommandtierCommandsstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>tierCreateParamsstatic java.lang.StringtierCreateUsagestatic java.lang.StringtierInfoUsagestatic java.lang.StringtierListUsagestatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>tierModifyParamsstatic java.lang.StringtierModifyUsagestatic java.lang.StringTIERNAME_PARAM_NAMEstatic java.lang.StringtierRemoveUsagestatic java.lang.StringTYPE_PARAM_NAMEstatic java.lang.StringURL_PARAM_NAME
-
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.TierListRequestbuildNextRequest(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.TierRemoveResponsedeleteTierFromCLDB(java.lang.String tierName, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String cluster)static com.mapr.fs.cldb.proto.CLDBProto.TierCreateResponseEcTierCreate(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String userLoginId, java.lang.String tierName)com.mapr.cliframework.base.CommandOutputexecuteRealCommand()static java.lang.StringgenerateTierNameForAutoCreate(java.lang.String ecVolumeName)java.lang.StringgetMetaVolumeTopology(java.lang.String metaVolumeName)com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreTypegetObjectStoreType(java.lang.String objectStoreType)java.lang.StringgetObjectTypeString(com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType objStore)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.TierListResponsesendRequest(com.google.protobuf.MessageLite request)Send the request using RPC and fetch the response.static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponsetierLookup(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, int tierId)static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponsetierLookup(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String tierName)static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponsetierLookup(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String tierName, int tierId)static inttierRemove(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.cli.common.ListCommand
getFilters, getNextLimiter, hasMore, list
-
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
-
-
-
-
Field Detail
-
S3_AWS
public static final java.lang.String S3_AWS
- See Also:
- Constant Field Values
-
S3_GCS
public static final java.lang.String S3_GCS
- See Also:
- Constant Field Values
-
S3_HDS
public static final java.lang.String S3_HDS
- See Also:
- Constant Field Values
-
S3_IBM
public static final java.lang.String S3_IBM
- See Also:
- Constant Field Values
-
Azure_Blobs
public static final java.lang.String Azure_Blobs
- See Also:
- Constant Field Values
-
S3_Others
public static final java.lang.String S3_Others
- See Also:
- Constant Field Values
-
MAX_OBJ_SIZE
public static final int MAX_OBJ_SIZE
- See Also:
- Constant Field Values
-
TIERNAME_PARAM_NAME
public static final java.lang.String TIERNAME_PARAM_NAME
- See Also:
- Constant Field Values
-
TYPE_PARAM_NAME
public static final java.lang.String TYPE_PARAM_NAME
- See Also:
- Constant Field Values
-
AUTH_PARAM_NAME
public static final java.lang.String AUTH_PARAM_NAME
- See Also:
- Constant Field Values
-
URL_PARAM_NAME
public static final java.lang.String URL_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
-
BUCKET_NAME
public static final java.lang.String BUCKET_NAME
- See Also:
- Constant Field Values
-
REGION
public static final java.lang.String REGION
- 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
-
DEFAULT_REGION
public static final java.lang.String DEFAULT_REGION
- 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
-
tierCreateUsage
public static final java.lang.String tierCreateUsage
- See Also:
- Constant Field Values
-
tierModifyUsage
public static final java.lang.String tierModifyUsage
- See Also:
- Constant Field Values
-
tierListUsage
public static final java.lang.String tierListUsage
- See Also:
- Constant Field Values
-
tierInfoUsage
public static final java.lang.String tierInfoUsage
- See Also:
- Constant Field Values
-
tierRemoveUsage
public static final java.lang.String tierRemoveUsage
- 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
-
-
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
-
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.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
-
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.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.TierListResponse 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
-
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)
-
-