Package com.mapr.cli
Class AlarmCommands
- java.lang.Object
-
- com.mapr.cliframework.base.CLIBaseClass
-
- com.mapr.cli.common.ListCommand
-
- com.mapr.cli.AlarmCommands
-
- All Implemented Interfaces:
ListIterator,com.mapr.cliframework.base.CLIInterface
public class AlarmCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringaddGroupAlarmUsagestatic java.lang.StringaddGroupEmailUsagestatic java.lang.StringALARM_BASE_SERVICE_NAMEstatic java.lang.StringALARM_DISPLAY_NAME_PARAM_NAMEstatic java.lang.StringALARM_GROUP_ALARMS_PARAMstatic java.lang.StringALARM_GROUP_DISPLAY_NAMEstatic java.lang.StringALARM_GROUP_EMAILS_PARAMstatic java.lang.StringALARM_GROUP_ERRORstatic java.lang.StringALARM_GROUP_INFOstatic java.lang.StringALARM_GROUP_LIST_CMDstatic java.lang.StringALARM_GROUP_NAME_PARAMstatic java.lang.StringALARM_GROUP_WARNstatic java.lang.StringALARM_NAME_PARAM_NAMEstatic java.lang.StringALARM_NEWNAME_PARAM_NAMEstatic java.lang.StringALARM_SERVICE_DISPLAY_NAMEstatic java.lang.StringALARM_SERVICE_KEY_NAMEstatic java.lang.StringALARM_TERSE_NAME_PARAM_NAMEstatic java.lang.StringALARM_TOOLTIP_NAMEstatic java.lang.StringALARM_TYPE_PARAM_NAMEstatic java.lang.StringALARM_UI_DISPLAY_NAMEstatic com.mapr.cliframework.base.CLICommandalarmCmdsstatic com.mapr.cliframework.base.CLICommandalarmGroupCmdsstatic com.mapr.cliframework.base.CLICommand[]alarmGroupCmdsArraystatic java.util.Map<java.lang.String,com.mapr.fs.proto.Common.AlarmType>alarmNameMapstatic java.lang.StringALL_ALARMS_PARAM_NAMEstatic java.lang.StringASCENDING_SORTING_ORDER_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>baseParamsstatic java.lang.StringCLEARED_ALARMS_PARAM_NAMEstatic com.mapr.cliframework.base.CLICommandconfigCmdsstatic com.mapr.cliframework.base.CLICommand[]configCmdsArraystatic java.lang.StringdeleteGroupAlarmUsagestatic java.lang.StringdeleteGroupEmailUsagestatic java.lang.StringDESC_PARAM_NAMEstatic java.lang.StringDESCENDING_SORTING_ORDER_PARAM_NAMEstatic java.lang.StringENTITY_LIMIT_PARAM_NAMEstatic java.lang.StringENTITY_PARAM_NAMEstatic java.util.Map<com.mapr.fs.cldb.proto.CLDBProto.AlarmInfoFields,com.mapr.cliframework.util.FieldInfo>fieldTablestatic java.lang.StringFILTER_PARAM_NAMEstatic java.lang.StringLIMIT_PARAM_NAMEstatic java.lang.StringMULTI_ARG_SEPstatic java.lang.StringMUTE_DURATION_CONFIG_PARAM_NAMEstatic java.lang.StringMUTED_ALARMS_PARAM_NAMEstatic java.lang.StringNEED_ALARMS_COUNTstatic java.lang.StringOUTPUT_PARAM_NAMEstatic java.lang.StringS3_ACCOUNT_NAMEstatic java.lang.StringS3_CLUSTER_ALARMstatic java.lang.StringSORTBY_PARAM_NAMEstatic java.lang.StringSORTING_ORDER_PARAM_NAMEstatic java.lang.StringSTART_PARAM_NAMEstatic java.lang.StringSUMMARY_PARAM_NAMEstatic java.lang.StringTIME_FRAME_FROM_PARAM_NAMEstatic java.lang.StringTIME_FRAME_TILL_PARAM_NAMEstatic java.lang.StringVALUES_PARAM_NAME
-
Constructor Summary
Constructors Constructor Description AlarmCommands(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.google.protobuf.MessageLitebuildNextGroupListRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp)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()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.static booleanisValidAlarmTypeName(java.lang.String alarmTypeName)voidprocessGroupListResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response)voidprocessMutedAlarmListResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response)voidprocessMutedAndRaisedAlarmListResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response)voidprocessResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response)Parse the response and populate the output hierarchy.com.google.protobuf.MessageLitesendGroupListRequest(com.google.protobuf.MessageLite request)com.google.protobuf.MessageLitesendRequest(com.google.protobuf.MessageLite request)Send the request using RPC and fetch the response.booleanvalidateInputParams(com.mapr.cliframework.base.CommandOutput output)-
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
-
ALARM_NAME_PARAM_NAME
public static final java.lang.String ALARM_NAME_PARAM_NAME
- See Also:
- Constant Field Values
-
ALARM_NEWNAME_PARAM_NAME
public static final java.lang.String ALARM_NEWNAME_PARAM_NAME
- See Also:
- Constant Field Values
-
ALARM_TERSE_NAME_PARAM_NAME
public static final java.lang.String ALARM_TERSE_NAME_PARAM_NAME
- See Also:
- Constant Field Values
-
ALARM_TYPE_PARAM_NAME
public static final java.lang.String ALARM_TYPE_PARAM_NAME
- See Also:
- Constant Field Values
-
ALARM_DISPLAY_NAME_PARAM_NAME
public static final java.lang.String ALARM_DISPLAY_NAME_PARAM_NAME
- See Also:
- Constant Field Values
-
ALARM_SERVICE_DISPLAY_NAME
public static final java.lang.String ALARM_SERVICE_DISPLAY_NAME
- See Also:
- Constant Field Values
-
ALARM_SERVICE_KEY_NAME
public static final java.lang.String ALARM_SERVICE_KEY_NAME
- See Also:
- Constant Field Values
-
ALARM_BASE_SERVICE_NAME
public static final java.lang.String ALARM_BASE_SERVICE_NAME
- See Also:
- Constant Field Values
-
ALARM_UI_DISPLAY_NAME
public static final java.lang.String ALARM_UI_DISPLAY_NAME
- See Also:
- Constant Field Values
-
ALARM_GROUP_DISPLAY_NAME
public static final java.lang.String ALARM_GROUP_DISPLAY_NAME
- See Also:
- Constant Field Values
-
ALARM_TOOLTIP_NAME
public static final java.lang.String ALARM_TOOLTIP_NAME
- See Also:
- Constant Field Values
-
SUMMARY_PARAM_NAME
public static final java.lang.String SUMMARY_PARAM_NAME
- See Also:
- Constant Field Values
-
ENTITY_LIMIT_PARAM_NAME
public static final java.lang.String ENTITY_LIMIT_PARAM_NAME
- See Also:
- Constant Field Values
-
CLEARED_ALARMS_PARAM_NAME
public static final java.lang.String CLEARED_ALARMS_PARAM_NAME
- See Also:
- Constant Field Values
-
ENTITY_PARAM_NAME
public static final java.lang.String ENTITY_PARAM_NAME
- See Also:
- Constant Field Values
-
VALUES_PARAM_NAME
public static final java.lang.String VALUES_PARAM_NAME
- See Also:
- Constant Field Values
-
DESC_PARAM_NAME
public static final java.lang.String DESC_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
-
FILTER_PARAM_NAME
public static final java.lang.String FILTER_PARAM_NAME
- See Also:
- Constant Field Values
-
OUTPUT_PARAM_NAME
public static final java.lang.String OUTPUT_PARAM_NAME
- See Also:
- Constant Field Values
-
ALARM_GROUP_NAME_PARAM
public static final java.lang.String ALARM_GROUP_NAME_PARAM
- See Also:
- Constant Field Values
-
ALARM_GROUP_EMAILS_PARAM
public static final java.lang.String ALARM_GROUP_EMAILS_PARAM
- See Also:
- Constant Field Values
-
ALARM_GROUP_ALARMS_PARAM
public static final java.lang.String ALARM_GROUP_ALARMS_PARAM
- See Also:
- Constant Field Values
-
ALARM_GROUP_LIST_CMD
public static final java.lang.String ALARM_GROUP_LIST_CMD
- See Also:
- Constant Field Values
-
MULTI_ARG_SEP
public static final java.lang.String MULTI_ARG_SEP
- See Also:
- Constant Field Values
-
SORTBY_PARAM_NAME
public static final java.lang.String SORTBY_PARAM_NAME
- See Also:
- Constant Field Values
-
MUTED_ALARMS_PARAM_NAME
public static final java.lang.String MUTED_ALARMS_PARAM_NAME
- See Also:
- Constant Field Values
-
ALL_ALARMS_PARAM_NAME
public static final java.lang.String ALL_ALARMS_PARAM_NAME
- See Also:
- Constant Field Values
-
MUTE_DURATION_CONFIG_PARAM_NAME
public static final java.lang.String MUTE_DURATION_CONFIG_PARAM_NAME
- See Also:
- Constant Field Values
-
TIME_FRAME_FROM_PARAM_NAME
public static final java.lang.String TIME_FRAME_FROM_PARAM_NAME
- See Also:
- Constant Field Values
-
TIME_FRAME_TILL_PARAM_NAME
public static final java.lang.String TIME_FRAME_TILL_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
-
NEED_ALARMS_COUNT
public static final java.lang.String NEED_ALARMS_COUNT
- See Also:
- Constant Field Values
-
S3_ACCOUNT_NAME
public static final java.lang.String S3_ACCOUNT_NAME
- See Also:
- Constant Field Values
-
S3_CLUSTER_ALARM
public static final java.lang.String S3_CLUSTER_ALARM
- See Also:
- Constant Field Values
-
ALARM_GROUP_INFO
public static final java.lang.String ALARM_GROUP_INFO
- See Also:
- Constant Field Values
-
ALARM_GROUP_WARN
public static final java.lang.String ALARM_GROUP_WARN
- See Also:
- Constant Field Values
-
ALARM_GROUP_ERROR
public static final java.lang.String ALARM_GROUP_ERROR
- See Also:
- Constant Field Values
-
alarmNameMap
public static final java.util.Map<java.lang.String,com.mapr.fs.proto.Common.AlarmType> alarmNameMap
-
baseParams
public static java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter> baseParams
-
configCmdsArray
public static final com.mapr.cliframework.base.CLICommand[] configCmdsArray
-
configCmds
public static com.mapr.cliframework.base.CLICommand configCmds
-
addGroupEmailUsage
public static final java.lang.String addGroupEmailUsage
- See Also:
- Constant Field Values
-
deleteGroupEmailUsage
public static final java.lang.String deleteGroupEmailUsage
- See Also:
- Constant Field Values
-
addGroupAlarmUsage
public static final java.lang.String addGroupAlarmUsage
- See Also:
- Constant Field Values
-
deleteGroupAlarmUsage
public static final java.lang.String deleteGroupAlarmUsage
- See Also:
- Constant Field Values
-
alarmGroupCmdsArray
public static final com.mapr.cliframework.base.CLICommand[] alarmGroupCmdsArray
-
alarmGroupCmds
public static com.mapr.cliframework.base.CLICommand alarmGroupCmds
-
alarmCmds
public static final com.mapr.cliframework.base.CLICommand alarmCmds
-
fieldTable
public static java.util.Map<com.mapr.fs.cldb.proto.CLDBProto.AlarmInfoFields,com.mapr.cliframework.util.FieldInfo> fieldTable
-
-
Method Detail
-
isValidAlarmTypeName
public static boolean isValidAlarmTypeName(java.lang.String alarmTypeName)
-
validateInputParams
public boolean validateInputParams(com.mapr.cliframework.base.CommandOutput output) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
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
-
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
-
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.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
-
sendGroupListRequest
public com.google.protobuf.MessageLite sendGroupListRequest(com.google.protobuf.MessageLite request) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
buildNextGroupListRequest
public com.google.protobuf.MessageLite buildNextGroupListRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
processGroupListResponse
public void processGroupListResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
processMutedAlarmListResponse
public void processMutedAlarmListResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
processMutedAndRaisedAlarmListResponse
public void processMutedAndRaisedAlarmListResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingException- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
-