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 Summary
Fields Modifier and Type Field Description static java.lang.StringADD_SPINFOstatic java.lang.StringALARMEDNODES_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>allowIntoClusterParamsstatic java.lang.StringASCENDING_SORTING_ORDER_PARAM_NAMEstatic java.lang.StringBLOCK_IN_MOVES_PARAM_NAMEstatic java.lang.StringBLOCK_OUT_MOVES_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>canRemoveSpParamsstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>cldbPrimaryParamsstatic java.lang.StringCLIENTS_ONLY_PARAM_NAMEstatic java.lang.StringCOLUMNS_PARAM_NAMEstatic java.lang.StringDEFAULT_LABELstatic java.lang.StringDESCENDING_SORTING_ORDER_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>failoverNodeParamsstatic java.util.Map<NodeField,com.mapr.cliframework.util.FieldInfo>fieldTablestatic com.google.common.collect.ImmutableMap.Builder<NodeField,com.mapr.cliframework.util.FieldInfo>fieldTableBuilderstatic java.lang.StringFILESERVER_HOSTPORT_PARAM_NAMEstatic java.lang.StringFILESERVER_ID_PARAM_NAMEstatic java.lang.StringFILESERVER_MARKMAINTENANCE_TIMEOUT_MINUTESstatic java.lang.StringFILESERVER_NODES_PARAM_NAMEstatic java.lang.StringFILESERVER_TOPOLOGY_PARAM_NAMEstatic java.lang.StringFILTER_PARAM_NAMEstatic java.lang.StringHOSTID_PARAM_NAMEstatic java.lang.StringLIMIT_PARAM_NAMEstatic java.lang.StringLOCAL_CONTAINERS_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>markMaintenanceParamsstatic java.lang.StringMEMORY_PERINSTANCE_PARAMstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>modifyParamsstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>moveParamsstatic java.lang.StringMULTI_ARG_SEPstatic java.lang.StringNFSNODES_PARAM_NAMEstatic java.lang.StringNUM_INSTANCES_ON_A_NODE_PARAMstatic intNUM_NODES_PER_RPCstatic java.lang.StringNUM_SPS_PERINSTANCE_PARAMstatic java.lang.StringOUTPUT_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>refillParamsstatic com.mapr.cliframework.base.CLICommandserverCommandsstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>serverListParamsstatic java.lang.StringSORT_DIRECTION_PARAM_NAMEstatic java.lang.StringSORT_PARAM_NAMEstatic java.lang.StringSORTBY_PARAM_NAMEstatic java.lang.StringSORTING_ORDER_PARAM_NAMEstatic java.lang.StringSP_CANREMOVE_PARAM_NAMEstatic java.lang.StringSP_CANREMOVE_SPID_PARAM_NAMEstatic java.lang.StringSTART_PARAM_NAMEstatic java.lang.StringTOPO_PARENT_PARAM_NAMEstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>topoParamsstatic java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter>topoSizeParams
-
Constructor Summary
Constructors Constructor Description ServerCommands(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.FileServerListRequestbuildNextRequest(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()static intformatNodeState(com.mapr.fs.cldb.proto.CLDBProto.NodeState s)java.lang.StringgetCommandUsage()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 resp)Parse the response and populate the output hierarchy.com.mapr.fs.cldb.proto.CLDBProto.FileServerListResponsesendRequest(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, getGIds, getInput, getKeyType, getParamBooleanValue, getParamDateValue, getParamIntValue, getParamLongValue, getParamObjectValue, getParamTextValue, getUserClusterOps, getUserCredentials, getUserId, getUserLoginId, getVersion, isParamPresent, isParamValueEmpty, setServerCall, setUserClusterOps, setUserCredentials, setUserCredentialsByJwt, setVersion, skipValidation, validateInput
-
-
-
-
Field Detail
-
NUM_NODES_PER_RPC
public static final int NUM_NODES_PER_RPC
- See Also:
- Constant Field Values
-
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_PARAM_NAME
public static final java.lang.String SORT_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
-
ADD_SPINFO
public static final java.lang.String ADD_SPINFO
- See Also:
- Constant Field Values
-
DEFAULT_LABEL
public static final java.lang.String DEFAULT_LABEL
- See Also:
- Constant Field Values
-
MULTI_ARG_SEP
public static final java.lang.String MULTI_ARG_SEP
- 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
-
cldbPrimaryParams
public static java.util.Map<java.lang.String,com.mapr.cliframework.base.inputparams.BaseInputParameter> cldbPrimaryParams
-
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
-
-
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
-
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.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 resp) 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.OutputHierarchyresp- - 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.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
-
formatNodeState
public static int formatNodeState(com.mapr.fs.cldb.proto.CLDBProto.NodeState s)
-
getCommandUsage
public java.lang.String getCommandUsage()
- Overrides:
getCommandUsagein classcom.mapr.cliframework.base.CLIBaseClass
-
-