Package com.mapr.cli

Class ServerCommands

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

    public class ServerCommands
    extends ListCommand
    implements com.mapr.cliframework.base.CLIInterface
    • Field Detail

      • FILTER_PARAM_NAME

        public static final java.lang.String FILTER_PARAM_NAME
        See Also:
        Constant Field Values
      • COLUMNS_PARAM_NAME

        public static final java.lang.String COLUMNS_PARAM_NAME
        See Also:
        Constant Field Values
      • ALARMEDNODES_PARAM_NAME

        public static final java.lang.String ALARMEDNODES_PARAM_NAME
        See Also:
        Constant Field Values
      • NFSNODES_PARAM_NAME

        public static final java.lang.String NFSNODES_PARAM_NAME
        See Also:
        Constant Field Values
      • SORT_DIRECTION_PARAM_NAME

        public static final java.lang.String SORT_DIRECTION_PARAM_NAME
        See Also:
        Constant Field Values
      • OUTPUT_PARAM_NAME

        public static final java.lang.String OUTPUT_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
      • TOPO_PARENT_PARAM_NAME

        public static final java.lang.String TOPO_PARENT_PARAM_NAME
        See Also:
        Constant Field Values
      • CLIENTS_ONLY_PARAM_NAME

        public static final java.lang.String CLIENTS_ONLY_PARAM_NAME
        See Also:
        Constant Field Values
      • SP_CANREMOVE_PARAM_NAME

        public static final java.lang.String SP_CANREMOVE_PARAM_NAME
        See Also:
        Constant Field Values
      • SP_CANREMOVE_SPID_PARAM_NAME

        public static final java.lang.String SP_CANREMOVE_SPID_PARAM_NAME
        See Also:
        Constant Field Values
      • FILESERVER_ID_PARAM_NAME

        public static final java.lang.String FILESERVER_ID_PARAM_NAME
        See Also:
        Constant Field Values
      • HOSTID_PARAM_NAME

        public static final java.lang.String HOSTID_PARAM_NAME
        See Also:
        Constant Field Values
      • FILESERVER_HOSTPORT_PARAM_NAME

        public static final java.lang.String FILESERVER_HOSTPORT_PARAM_NAME
        See Also:
        Constant Field Values
      • FILESERVER_NODES_PARAM_NAME

        public static final java.lang.String FILESERVER_NODES_PARAM_NAME
        See Also:
        Constant Field Values
      • FILESERVER_MARKMAINTENANCE_TIMEOUT_MINUTES

        public static final java.lang.String FILESERVER_MARKMAINTENANCE_TIMEOUT_MINUTES
        See Also:
        Constant Field Values
      • FILESERVER_TOPOLOGY_PARAM_NAME

        public static final java.lang.String FILESERVER_TOPOLOGY_PARAM_NAME
        See Also:
        Constant Field Values
      • BLOCK_OUT_MOVES_PARAM_NAME

        public static final java.lang.String BLOCK_OUT_MOVES_PARAM_NAME
        See Also:
        Constant Field Values
      • BLOCK_IN_MOVES_PARAM_NAME

        public static final java.lang.String BLOCK_IN_MOVES_PARAM_NAME
        See Also:
        Constant Field Values
      • LOCAL_CONTAINERS_PARAM_NAME

        public static final java.lang.String LOCAL_CONTAINERS_PARAM_NAME
        See Also:
        Constant Field Values
      • NUM_SPS_PERINSTANCE_PARAM

        public static final java.lang.String NUM_SPS_PERINSTANCE_PARAM
        See Also:
        Constant Field Values
      • NUM_INSTANCES_ON_A_NODE_PARAM

        public static final java.lang.String NUM_INSTANCES_ON_A_NODE_PARAM
        See Also:
        Constant Field Values
      • MEMORY_PERINSTANCE_PARAM

        public static final java.lang.String MEMORY_PERINSTANCE_PARAM
        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
      • fieldTable

        public static java.util.Map<NodeField,​com.mapr.cliframework.util.FieldInfo> fieldTable
      • fieldTableBuilder

        public static com.google.common.collect.ImmutableMap.Builder<NodeField,​com.mapr.cliframework.util.FieldInfo> fieldTableBuilder
      • serverListParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> serverListParams
      • topoParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> topoParams
      • topoSizeParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> topoSizeParams
      • cldbMasterParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> cldbMasterParams
      • canRemoveSpParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> canRemoveSpParams
      • moveParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> moveParams
      • modifyParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> modifyParams
      • allowIntoClusterParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> allowIntoClusterParams
      • markMaintenanceParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> markMaintenanceParams
      • failoverNodeParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> failoverNodeParams
      • refillParams

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> refillParams
      • serverCommands

        public static final com.mapr.cliframework.base.CLICommand serverCommands
    • Constructor Detail

      • ServerCommands

        public ServerCommands​(com.mapr.cliframework.base.ProcessedInput input,
                              com.mapr.cliframework.base.CLICommand cliCommand)
    • Method Detail

      • 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.mapr.fs.cldb.proto.CLDBProto.FileServerListRequest 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 resp)
                             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
        resp - - response object
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • sendRequest

        public com.mapr.fs.cldb.proto.CLDBProto.FileServerListResponse 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
      • formatNodeState

        public static int formatNodeState​(com.mapr.fs.cldb.proto.CLDBProto.NodeState s)
      • getCommandUsage

        public java.lang.String getCommandUsage()
        Overrides:
        getCommandUsage in class com.mapr.cliframework.base.CLIBaseClass