Package com.mapr.cli

Class AlarmCommands

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

    public class AlarmCommands
    extends ListCommand
    implements com.mapr.cliframework.base.CLIInterface
    • 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
      • 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
      • 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_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
    • Constructor Detail

      • AlarmCommands

        public AlarmCommands​(com.mapr.cliframework.base.ProcessedInput input,
                             com.mapr.cliframework.base.CLICommand cliCommand)
    • 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:
        executeRealCommand in class com.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.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
      • 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.google.protobuf.MessageLite 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
      • 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