Package com.mapr.cli

Class ServerCommands

java.lang.Object
com.mapr.cliframework.base.CLIBaseClass
com.mapr.cli.common.ListCommand
com.mapr.cli.ServerCommands
All Implemented Interfaces:
ListIterator, com.mapr.cliframework.base.CLIInterface

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

    • NUM_NODES_PER_RPC

      public static final int NUM_NODES_PER_RPC
      See Also:
    • FILTER_PARAM_NAME

      public static final String FILTER_PARAM_NAME
      See Also:
    • COLUMNS_PARAM_NAME

      public static final String COLUMNS_PARAM_NAME
      See Also:
    • ALARMEDNODES_PARAM_NAME

      public static final String ALARMEDNODES_PARAM_NAME
      See Also:
    • NFSNODES_PARAM_NAME

      public static final String NFSNODES_PARAM_NAME
      See Also:
    • SORT_PARAM_NAME

      public static final String SORT_PARAM_NAME
      See Also:
    • SORT_DIRECTION_PARAM_NAME

      public static final String SORT_DIRECTION_PARAM_NAME
      See Also:
    • OUTPUT_PARAM_NAME

      public static final String OUTPUT_PARAM_NAME
      See Also:
    • START_PARAM_NAME

      public static final String START_PARAM_NAME
      See Also:
    • LIMIT_PARAM_NAME

      public static final String LIMIT_PARAM_NAME
      See Also:
    • TOPO_PARENT_PARAM_NAME

      public static final String TOPO_PARENT_PARAM_NAME
      See Also:
    • CLIENTS_ONLY_PARAM_NAME

      public static final String CLIENTS_ONLY_PARAM_NAME
      See Also:
    • SP_CANREMOVE_PARAM_NAME

      public static final String SP_CANREMOVE_PARAM_NAME
      See Also:
    • SP_CANREMOVE_SPID_PARAM_NAME

      public static final String SP_CANREMOVE_SPID_PARAM_NAME
      See Also:
    • FILESERVER_ID_PARAM_NAME

      public static final String FILESERVER_ID_PARAM_NAME
      See Also:
    • HOSTID_PARAM_NAME

      public static final String HOSTID_PARAM_NAME
      See Also:
    • FILESERVER_HOSTPORT_PARAM_NAME

      public static final String FILESERVER_HOSTPORT_PARAM_NAME
      See Also:
    • FILESERVER_NODES_PARAM_NAME

      public static final String FILESERVER_NODES_PARAM_NAME
      See Also:
    • FILESERVER_MARKMAINTENANCE_TIMEOUT_MINUTES

      public static final String FILESERVER_MARKMAINTENANCE_TIMEOUT_MINUTES
      See Also:
    • FILESERVER_TOPOLOGY_PARAM_NAME

      public static final String FILESERVER_TOPOLOGY_PARAM_NAME
      See Also:
    • BLOCK_OUT_MOVES_PARAM_NAME

      public static final String BLOCK_OUT_MOVES_PARAM_NAME
      See Also:
    • BLOCK_IN_MOVES_PARAM_NAME

      public static final String BLOCK_IN_MOVES_PARAM_NAME
      See Also:
    • LOCAL_CONTAINERS_PARAM_NAME

      public static final String LOCAL_CONTAINERS_PARAM_NAME
      See Also:
    • NUM_SPS_PERINSTANCE_PARAM

      public static final String NUM_SPS_PERINSTANCE_PARAM
      See Also:
    • NUM_INSTANCES_ON_A_NODE_PARAM

      public static final String NUM_INSTANCES_ON_A_NODE_PARAM
      See Also:
    • MEMORY_PERINSTANCE_PARAM

      public static final String MEMORY_PERINSTANCE_PARAM
      See Also:
    • SORTBY_PARAM_NAME

      public static final String SORTBY_PARAM_NAME
      See Also:
    • SORTING_ORDER_PARAM_NAME

      public static final String SORTING_ORDER_PARAM_NAME
      See Also:
    • ASCENDING_SORTING_ORDER_PARAM_NAME

      public static final String ASCENDING_SORTING_ORDER_PARAM_NAME
      See Also:
    • DESCENDING_SORTING_ORDER_PARAM_NAME

      public static final String DESCENDING_SORTING_ORDER_PARAM_NAME
      See Also:
    • ADD_SPINFO

      public static final String ADD_SPINFO
      See Also:
    • DEFAULT_LABEL

      public static final String DEFAULT_LABEL
      See Also:
    • MULTI_ARG_SEP

      public static final String MULTI_ARG_SEP
      See Also:
    • fieldTable

      public static 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 Map<String,com.mapr.cliframework.base.inputparams.BaseInputParameter> serverListParams
    • topoParams

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

      public static Map<String,com.mapr.cliframework.base.inputparams.BaseInputParameter> topoSizeParams
    • cldbPrimaryParams

      public static Map<String,com.mapr.cliframework.base.inputparams.BaseInputParameter> cldbPrimaryParams
    • canRemoveSpParams

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

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

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

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

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

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

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

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

    • ServerCommands

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

    • 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 String getCommandUsage()
      Overrides:
      getCommandUsage in class com.mapr.cliframework.base.CLIBaseClass