Package com.mapr.cli

Class ServiceCommands

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

    public class ServiceCommands
    extends com.mapr.cliframework.base.CLIBaseClass
    implements com.mapr.cliframework.base.CLIInterface
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.String,​com.mapr.cliframework.util.FieldInfo> fieldTable  
      static com.mapr.cliframework.base.CLICommand serviceCommands  
      static java.util.Map<java.lang.String,​com.mapr.cliframework.base.inputparams.BaseInputParameter> serviceListParams  
      • Fields inherited from class com.mapr.cliframework.base.CLIBaseClass

        cliCommand, CLUSTER_NAME_PARAM, clusterParams, HELP_PARAM, input, isServerCall, NOT_REQUIRED, output, REQUIRED, userInfo, version
      • Fields inherited from interface com.mapr.cliframework.base.CLIInterface

        PASSWORD_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceCommands​(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.cliframework.base.CommandOutput executeRealCommand()  
      static java.util.Set<java.lang.String> getConfiguredServices​(java.util.List<java.lang.String> nodeHostNames, java.util.List<java.lang.String> nodeIps, java.lang.String zkConnectString, java.lang.String clusterName)
      Fetches from zk a map of services configured on all the nodes.
      static java.util.Set<java.lang.String> getRunningServices​(java.util.List<java.lang.String> nodeHostNames, java.util.List<java.lang.String> nodeIps, java.lang.String zkConnectString, java.lang.String clusterName)
      Fetches from zk a map of services running on all the nodes.
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.mapr.cliframework.base.CLIInterface

        executeCommand, getCLICommand, getGIds, getUserId, getUserLoginId, setServerCall, setUserCredentials, setVersion, validateInput
    • Field Detail

      • serviceListParams

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

        public static final com.mapr.cliframework.base.CLICommand serviceCommands
      • fieldTable

        public static java.util.Map<java.lang.String,​com.mapr.cliframework.util.FieldInfo> fieldTable
    • Constructor Detail

      • ServiceCommands

        public ServiceCommands​(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
      • getConfiguredServices

        public static java.util.Set<java.lang.String> getConfiguredServices​(java.util.List<java.lang.String> nodeHostNames,
                                                                            java.util.List<java.lang.String> nodeIps,
                                                                            java.lang.String zkConnectString,
                                                                            java.lang.String clusterName)
                                                                     throws com.mapr.cliframework.base.CLIProcessingException
        Fetches from zk a map of services configured on all the nodes. Looks up the services configured on the passed in node. Returns the set of services.
        Parameters:
        nodeHostName - - hostname of the node
        nodeIps - - all the IPs of the node
        zkConnectString - - connection string to connect to zk
        Returns:
        - a set of services configured on the node
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • getRunningServices

        public static java.util.Set<java.lang.String> getRunningServices​(java.util.List<java.lang.String> nodeHostNames,
                                                                         java.util.List<java.lang.String> nodeIps,
                                                                         java.lang.String zkConnectString,
                                                                         java.lang.String clusterName)
                                                                  throws com.mapr.cliframework.base.CLIProcessingException
        Fetches from zk a map of services running on all the nodes. Looks up the services running on the passed in node. Returns the set of services.
        Parameters:
        nodeHostName - - hostname of the node
        nodeIps - - all the IPs of the node
        zkConnectString - - connection string to connect to zk
        Returns:
        - a set of services running on the node
        Throws:
        com.mapr.cliframework.base.CLIProcessingException