Class NodesCommonUtils

java.lang.Object
com.mapr.cli.common.NodesCommonUtils

public class NodesCommonUtils extends Object
  • Field Details

  • Method Details

    • getInstance

      public static NodesCommonUtils getInstance()
    • executeNodeListCommand

      public static com.mapr.cliframework.base.CommandOutput executeNodeListCommand(String[] args) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • isValidPort

      public static Boolean isValidPort(int port)
    • prepareParamsForNodeListCommand

      public static String[] prepareParamsForNodeListCommand(String filter, String zkConnectString)
    • findNodeIps

      public static List<String> findNodeIps(String zkConnectString)
    • findNodeIps

      public static List<String> findNodeIps(String zkConnectString, String clusterName)
    • findNodeIps

      @Deprecated public List<String> findNodeIps(org.apache.zookeeper.ZooKeeper s_zk)
      Deprecated.
    • findFilteredNodeIps

      public static List<String> findFilteredNodeIps(String filter, String zkConnectString) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • convertHostToIpAddrList

      public static List<com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr> convertHostToIpAddrList(List<String> nodeHostNames)
    • convertHostToIpIncludingLocal

      public static List<String> convertHostToIpIncludingLocal(List<String> nodeHostNames)
    • convertIpToHost

      public static List<String> convertIpToHost(List<String> nodeIpNames)
    • getServiceMasterData

      public static com.mapr.fs.proto.Common.ServiceData getServiceMasterData(String zkConnectString, String serviceName)
    • isServiceAvailable

      public static boolean isServiceAvailable(String zkConnectString, String serviceName)
    • getServiceNodeData

      public static Map<String,com.mapr.fs.proto.Common.ServiceData> getServiceNodeData(String zkConnectString, String serviceName)
    • getServiceNodeData

      public static Map<String,com.mapr.fs.proto.Common.ServiceData> getServiceNodeData(String zkConnectString, String serviceName, String clusterName)
    • getServiceNodesProperties

      public static Map<String,Properties> getServiceNodesProperties(String zkConnectString, String serviceName)
    • getServiceNodesProperties

      public static Map<String,Properties> getServiceNodesProperties(String zkConnectString, String serviceName, String clusterName)
    • serviceToNodesMap

      public static Map<String,List<String>> serviceToNodesMap(String zkConnectString) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • serviceToNodesMap

      public static Map<String,List<String>> serviceToNodesMap(String zkConnectString, String clusterName) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findServicesRunningHierarchy

      public static Map<String,List<String>> findServicesRunningHierarchy(String zkConnectString) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findServicesRunningHierarchy

      public static Map<String,List<String>> findServicesRunningHierarchy(String zkConnectString, String clusterName) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findServicesConfiguredHierarchy

      public static Map<String,List<String>> findServicesConfiguredHierarchy(String zkConnectString) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findServicesConfiguredHierarchy

      public static Map<String,List<String>> findServicesConfiguredHierarchy(String zkConnectString, String clusterName) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findServicesRunningHierarchy

      @Deprecated public static Map<String,List<String>> findServicesRunningHierarchy(org.apache.zookeeper.ZooKeeper s_zk) throws com.mapr.cliframework.base.CLIProcessingException
      Deprecated.
      Return full blown hierarchy
      Parameters:
      s_zk -
      Returns:
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findConfiguredServicesHierarchy

      @Deprecated public static Map<String,List<String>> findConfiguredServicesHierarchy(org.apache.zookeeper.ZooKeeper s_zk) throws com.mapr.cliframework.base.CLIProcessingException
      Deprecated.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findConfiguredServicesByServiceHierarchy

      public static Map<String,List<String>> findConfiguredServicesByServiceHierarchy(String zkConnectString) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findConfiguredServicesByServiceHierarchy

      public static Map<String,List<String>> findConfiguredServicesByServiceHierarchy(String zkConnectString, String ClusterName) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • findConfiguredServicesByServiceHierarchy

      @Deprecated public static Map<String,List<String>> findConfiguredServicesByServiceHierarchy(org.apache.zookeeper.ZooKeeper s_zk) throws com.mapr.cliframework.base.CLIProcessingException
      Deprecated.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • connect

      public static org.apache.zookeeper.ZooKeeper connect(String zkConnectString)
    • connect

      public static org.apache.zookeeper.ZooKeeper connect(String zkConnectString, String clusterName)
      Primary method to connect to ZK - will return cached connection if exist otherwise will try to connect
      Parameters:
      zkConnectString -
      Returns:
      Throws:
      IOException
    • getCurrentRMMasterID

      public static String getCurrentRMMasterID(String zkConnectString)
    • getFileServerInfo

      public static com.mapr.fs.cldb.proto.CLDBProto.FileServerInfo getFileServerInfo(com.mapr.fs.proto.Common.IPAddress server, com.mapr.fs.proto.Security.CredentialsMsg creds, String cluster) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException