Package com.mapr.cli
Class OffloadRuleCommands
- java.lang.Object
-
- com.mapr.cliframework.base.CLIBaseClass
-
- com.mapr.cli.common.ListCommand
-
- com.mapr.cli.OffloadRuleCommands
-
- All Implemented Interfaces:
ListIterator,com.mapr.cliframework.base.CLIInterface
public class OffloadRuleCommands 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.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>baseParamsstatic java.lang.StringDESCENDING_SORTING_ORDER_PARAM_NAMEstatic java.lang.StringEXPR_PARAM_NAMEstatic java.lang.StringOUTPUT_PARAM_NAMEstatic com.mapr.cliframework.base.CLICommandruleCommandsstatic com.mapr.cliframework.base.CLICommand[]ruleCommandsArraystatic java.lang.StringruleCreateUsagestatic java.lang.StringruleInfoUsagestatic java.lang.StringruleListUsagestatic java.lang.StringruleModifyUsagestatic java.lang.StringRULENAME_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>ruleParamsstatic java.lang.StringruleRemoveUsagestatic java.lang.StringSORTBY_PARAM_NAMEstatic java.lang.StringSORTING_ORDER_PARAM_NAME
-
Constructor Summary
Constructors Constructor Description OffloadRuleCommands(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.OffloadRuleListRequestbuildNextRequest(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.static com.mapr.fs.cldb.proto.CLDBProto.OffloadRuleLookupResponseruleLookup(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String ruleName)com.mapr.fs.cldb.proto.CLDBProto.OffloadRuleListResponsesendRequest(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, getCLICommand, getCommandUsage, getGIds, getInput, getKeyType, getParamBooleanValue, getParamDateValue, getParamIntValue, getParamLongValue, getParamObjectValue, getParamTextValue, getUserCredentials, getUserId, getUserLoginId, getVersion, isParamPresent, isParamValueEmpty, setServerCall, setUserCredentials, setVersion, validateInput
-
-
-
-
Field Detail
-
RULENAME_PARAM_NAME
public static final java.lang.String RULENAME_PARAM_NAME
- See Also:
- Constant Field Values
-
EXPR_PARAM_NAME
public static final java.lang.String EXPR_PARAM_NAME
- See Also:
- Constant Field Values
-
OUTPUT_PARAM_NAME
public static final java.lang.String OUTPUT_PARAM_NAME
- 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
-
ruleCreateUsage
public static final java.lang.String ruleCreateUsage
- See Also:
- Constant Field Values
-
ruleModifyUsage
public static final java.lang.String ruleModifyUsage
- See Also:
- Constant Field Values
-
ruleListUsage
public static final java.lang.String ruleListUsage
- See Also:
- Constant Field Values
-
ruleInfoUsage
public static final java.lang.String ruleInfoUsage
- See Also:
- Constant Field Values
-
ruleRemoveUsage
public static final java.lang.String ruleRemoveUsage
- See Also:
- Constant Field Values
-
baseParams
public static java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter> baseParams
-
ruleParams
public static java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter> ruleParams
-
ruleCommandsArray
public static com.mapr.cliframework.base.CLICommand[] ruleCommandsArray
-
ruleCommands
public static final com.mapr.cliframework.base.CLICommand ruleCommands
-
-
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
-
ruleLookup
public static com.mapr.fs.cldb.proto.CLDBProto.OffloadRuleLookupResponse ruleLookup(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String ruleName) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
buildNextRequest
public com.mapr.fs.cldb.proto.CLDBProto.OffloadRuleListRequest 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.OffloadRuleListResponse 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
-
-