Package com.mapr.cli
Class VolumeMetricsCommand
- java.lang.Object
-
- com.mapr.cliframework.base.CLIBaseClass
-
- com.mapr.cli.common.ListCommand
-
- com.mapr.cli.VolumeMetricsCommand
-
- All Implemented Interfaces:
ListIterator,com.mapr.cliframework.base.CLIInterface
public class VolumeMetricsCommand extends ListCommand implements com.mapr.cliframework.base.CLIInterface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLEAR_TEXTstatic java.lang.StringDATE_TIME_FORMATstatic java.lang.StringDURATION_PARAMstatic com.mapr.cliframework.base.CLICommandfetchUsageCmdstatic java.lang.StringFILE_NAMEstatic java.lang.StringFROM_TIME_PARAMstatic java.lang.StringTILL_TIME_PARAMstatic com.mapr.cliframework.base.CLICommand[]volumeMetricsCommandsstatic java.lang.StringvolumeMetricsCommandsUsage
-
Constructor Summary
Constructors Constructor Description VolumeMetricsCommand(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.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.CommandOutputexecuteRealCommand()voidgenerateMetricUsgaeFile(com.mapr.cliframework.base.CommandOutput.OutputHierarchy oh, java.lang.String file, boolean isFromParamPresent, boolean clearText)voidgetVolUsage(com.mapr.cliframework.base.CommandOutput.OutputHierarchy oh)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 oh, com.google.protobuf.MessageLite response)Parse the response and populate the output hierarchy.com.google.protobuf.MessageLitesendRequest(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
-
FROM_TIME_PARAM
public static final java.lang.String FROM_TIME_PARAM
- See Also:
- Constant Field Values
-
TILL_TIME_PARAM
public static final java.lang.String TILL_TIME_PARAM
- See Also:
- Constant Field Values
-
DURATION_PARAM
public static final java.lang.String DURATION_PARAM
- See Also:
- Constant Field Values
-
FILE_NAME
public static final java.lang.String FILE_NAME
- See Also:
- Constant Field Values
-
CLEAR_TEXT
public static final java.lang.String CLEAR_TEXT
- See Also:
- Constant Field Values
-
DATE_TIME_FORMAT
public static final java.lang.String DATE_TIME_FORMAT
- See Also:
- Constant Field Values
-
fetchUsageCmd
public static final com.mapr.cliframework.base.CLICommand fetchUsageCmd
-
volumeMetricsCommandsUsage
public static final java.lang.String volumeMetricsCommandsUsage
- See Also:
- Constant Field Values
-
volumeMetricsCommands
public static final com.mapr.cliframework.base.CLICommand[] volumeMetricsCommands
-
-
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
-
getVolUsage
public void getVolUsage(com.mapr.cliframework.base.CommandOutput.OutputHierarchy oh) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
generateMetricUsgaeFile
public void generateMetricUsgaeFile(com.mapr.cliframework.base.CommandOutput.OutputHierarchy oh, java.lang.String file, boolean isFromParamPresent, boolean clearText) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
processResponse
public void processResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy oh, 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:
oh- -CommandOutput.OutputHierarchyresponse- - 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.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
-
sendRequest
public com.google.protobuf.MessageLite 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
-
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
-
-