Package com.mapr.cli.common
Class NodesCommonUtils
java.lang.Object
com.mapr.cli.common.NodesCommonUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.zookeeper.ZooKeeperstatic org.apache.zookeeper.ZooKeeperPrimary method to connect to ZK - will return cached connection if exist otherwise will try to connectstatic List<com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr>convertHostToIpAddrList(List<String> nodeHostNames) convertHostToIpIncludingLocal(List<String> nodeHostNames) convertIpToHost(List<String> nodeIpNames) static com.mapr.cliframework.base.CommandOutputexecuteNodeListCommand(String[] args) findConfiguredServicesByServiceHierarchy(String zkConnectString) findConfiguredServicesByServiceHierarchy(String zkConnectString, String ClusterName) findConfiguredServicesByServiceHierarchy(org.apache.zookeeper.ZooKeeper s_zk) Deprecated.findConfiguredServicesHierarchy(org.apache.zookeeper.ZooKeeper s_zk) Deprecated.findFilteredNodeIps(String filter, String zkConnectString) findNodeIps(String zkConnectString) findNodeIps(String zkConnectString, String clusterName) findNodeIps(org.apache.zookeeper.ZooKeeper s_zk) Deprecated.findServicesConfiguredHierarchy(String zkConnectString) findServicesConfiguredHierarchy(String zkConnectString, String clusterName) findServicesRunningHierarchy(String zkConnectString) findServicesRunningHierarchy(String zkConnectString, String clusterName) findServicesRunningHierarchy(org.apache.zookeeper.ZooKeeper s_zk) Deprecated.static StringgetCurrentRMMasterID(String zkConnectString) static com.mapr.fs.cldb.proto.CLDBProto.FileServerInfogetFileServerInfo(com.mapr.fs.proto.Common.IPAddress server, com.mapr.fs.proto.Security.CredentialsMsg creds, String cluster) static NodesCommonUtilsstatic com.mapr.fs.proto.Common.ServiceDatagetServiceMasterData(String zkConnectString, String serviceName) getServiceNodeData(String zkConnectString, String serviceName) getServiceNodeData(String zkConnectString, String serviceName, String clusterName) static Map<String,Properties> getServiceNodesProperties(String zkConnectString, String serviceName) static Map<String,Properties> getServiceNodesProperties(String zkConnectString, String serviceName, String clusterName) static booleanisServiceAvailable(String zkConnectString, String serviceName) static BooleanisValidPort(int port) static String[]prepareParamsForNodeListCommand(String filter, String zkConnectString) serviceToNodesMap(String zkConnectString) serviceToNodesMap(String zkConnectString, String clusterName)
-
Field Details
-
CLDB_SERVICE_MASTER_PATH
- See Also:
-
SERVER_PATH
- See Also:
-
SERVICES_PATH
- See Also:
-
CONF_SERVICES_PATH
- See Also:
-
ZK_CONNECTSTRING
- See Also:
-
TIMEOUT_SERVER
public static final int TIMEOUT_SERVER- See Also:
-
localAddresses
-
LOG
public static final org.apache.commons.logging.Log LOG
-
-
Method Details
-
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
-
prepareParamsForNodeListCommand
-
findNodeIps
-
findNodeIps
-
findNodeIps
Deprecated. -
findFilteredNodeIps
public static List<String> findFilteredNodeIps(String filter, String zkConnectString) throws com.mapr.cliframework.base.CLIProcessingException - Throws:
com.mapr.cliframework.base.CLIProcessingException
-
convertHostToIpAddrList
-
convertHostToIpIncludingLocal
-
convertIpToHost
-
getServiceMasterData
-
isServiceAvailable
-
getServiceNodeData
-
getServiceNodeData
-
getServiceNodesProperties
public static Map<String,Properties> getServiceNodesProperties(String zkConnectString, String serviceName) -
getServiceNodesProperties
-
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
-
connect
Primary method to connect to ZK - will return cached connection if exist otherwise will try to connect- Parameters:
zkConnectString-- Returns:
- Throws:
IOException
-
getCurrentRMMasterID
-
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
-