org.apache.hadoop.hbase.zookeeper.ZKConfig.transformClusterKey()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKConfig.transformClusterKey()方法的一些代码示例,展示了ZKConfig.transformClusterKey()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKConfig.transformClusterKey()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZKConfig
类名称:ZKConfig
方法名:transformClusterKey

ZKConfig.transformClusterKey介绍

[英]Separate the given key into the three configurations it should contain: hbase.zookeeper.quorum, hbase.zookeeper.client.port and zookeeper.znode.parent
[中]将给定的密钥分为它应该包含的三种配置:hbase。动物园管理员。法定人数,hbase。动物园管理员。客户港口和动物园管理员。兹诺德。父母亲

代码示例

代码示例来源:origin: apache/hbase

/**
 * Verifies that the given key matches the expected format for a ZooKeeper cluster key.
 * The Quorum for the ZK cluster can have one the following formats (see examples below):
 *
 * <ol>
 *   <li>s1,s2,s3 (no client port in the list, the client port could be obtained from
 *       clientPort)</li>
 *   <li>s1:p1,s2:p2,s3:p3 (with client port, which could be same or different for each server,
 *       in this case, the clientPort would be ignored)</li>
 *   <li>s1:p1,s2,s3:p3 (mix of (1) and (2) - if port is not specified in a server, it would use
 *       the clientPort; otherwise, it would use the specified port)</li>
 * </ol>
 *
 * @param key the cluster key to validate
 * @throws IOException if the key could not be parsed
 */
public static void validateClusterKey(String key) throws IOException {
 transformClusterKey(key);
}

代码示例来源:origin: apache/hbase

/**
 * Apply the settings in the given key to the given configuration, this is
 * used to communicate with distant clusters
 * @param conf configuration object to configure
 * @param key string that contains the 3 required configuratins
 * @throws IOException
 */
private static void applyClusterKeyToConf(Configuration conf, String key)
  throws IOException{
 ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
 conf.set(HConstants.ZOOKEEPER_QUORUM, zkClusterKey.getQuorumString());
 conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, zkClusterKey.getClientPort());
 conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, zkClusterKey.getZnodeParent());
}

代码示例来源:origin: apache/hbase

String key = ensemble+":"+port+":"+znode;
String ensemble2 = null;
ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
if (multiplePortSupport) {
 ensemble2 = ZKConfig.standardizeZKQuorumServerString(ensemble,

代码示例来源:origin: org.apache.hbase/hbase-common

/**
 * Verifies that the given key matches the expected format for a ZooKeeper cluster key.
 * The Quorum for the ZK cluster can have one the following formats (see examples below):
 *
 * <ol>
 *   <li>s1,s2,s3 (no client port in the list, the client port could be obtained from
 *       clientPort)</li>
 *   <li>s1:p1,s2:p2,s3:p3 (with client port, which could be same or different for each server,
 *       in this case, the clientPort would be ignored)</li>
 *   <li>s1:p1,s2,s3:p3 (mix of (1) and (2) - if port is not specified in a server, it would use
 *       the clientPort; otherwise, it would use the specified port)</li>
 * </ol>
 *
 * @param key the cluster key to validate
 * @throws IOException if the key could not be parsed
 */
public static void validateClusterKey(String key) throws IOException {
 transformClusterKey(key);
}

代码示例来源:origin: com.aliyun.hbase/alihbase-common

/**
 * Verifies that the given key matches the expected format for a ZooKeeper cluster key.
 * The Quorum for the ZK cluster can have one the following formats (see examples below):
 *
 * <ol>
 *   <li>s1,s2,s3 (no client port in the list, the client port could be obtained from
 *       clientPort)</li>
 *   <li>s1:p1,s2:p2,s3:p3 (with client port, which could be same or different for each server,
 *       in this case, the clientPort would be ignored)</li>
 *   <li>s1:p1,s2,s3:p3 (mix of (1) and (2) - if port is not specified in a server, it would use
 *       the clientPort; otherwise, it would use the specified port)</li>
 * </ol>
 *
 * @param key the cluster key to validate
 * @throws IOException if the key could not be parsed
 */
public static void validateClusterKey(String key) throws IOException {
 transformClusterKey(key);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Verifies that the given key matches the expected format for a ZooKeeper cluster key.
 * The Quorum for the ZK cluster can have one the following formats (see examples below):
 *
 * <ol>
 *   <li>s1,s2,s3 (no client port in the list, the client port could be obtained from
 *       clientPort)</li>
 *   <li>s1:p1,s2:p2,s3:p3 (with client port, which could be same or different for each server,
 *       in this case, the clientPort would be ignored)</li>
 *   <li>s1:p1,s2,s3:p3 (mix of (1) and (2) - if port is not specified in a server, it would use
 *       the clientPort; otherwise, it would use the specified port)</li>
 * </ol>
 *
 * @param key the cluster key to validate
 * @throws IOException if the key could not be parsed
 */
public static void validateClusterKey(String key) throws IOException {
 transformClusterKey(key);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Apply the settings in the given key to the given configuration, this is
 * used to communicate with distant clusters
 * @param conf configuration object to configure
 * @param key string that contains the 3 required configuratins
 * @throws IOException
 */
private static void applyClusterKeyToConf(Configuration conf, String key)
  throws IOException{
 ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
 conf.set(HConstants.ZOOKEEPER_QUORUM, zkClusterKey.getQuorumString());
 conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, zkClusterKey.getClientPort());
 conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, zkClusterKey.getZnodeParent());
}

代码示例来源:origin: org.apache.hbase/hbase-common

/**
 * Apply the settings in the given key to the given configuration, this is
 * used to communicate with distant clusters
 * @param conf configuration object to configure
 * @param key string that contains the 3 required configuratins
 * @throws IOException
 */
private static void applyClusterKeyToConf(Configuration conf, String key)
  throws IOException{
 ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
 conf.set(HConstants.ZOOKEEPER_QUORUM, zkClusterKey.getQuorumString());
 conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, zkClusterKey.getClientPort());
 conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, zkClusterKey.getZnodeParent());
}

代码示例来源:origin: com.aliyun.hbase/alihbase-common

/**
 * Apply the settings in the given key to the given configuration, this is
 * used to communicate with distant clusters
 * @param conf configuration object to configure
 * @param key string that contains the 3 required configuratins
 * @throws IOException
 */
private static void applyClusterKeyToConf(Configuration conf, String key)
  throws IOException{
 ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
 conf.set(HConstants.ZOOKEEPER_QUORUM, zkClusterKey.getQuorumString());
 conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, zkClusterKey.getClientPort());
 conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, zkClusterKey.getZnodeParent());
}

代码示例来源:origin: org.apache.hbase/hbase-common

String key = ensemble+":"+port+":"+znode;
String ensemble2 = null;
ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
if (multiplePortSupport) {
 ensemble2 = ZKConfig.standardizeZKQuorumServerString(ensemble,

代码示例来源:origin: com.aliyun.hbase/alihbase-common

String key = ensemble+":"+port+":"+znode;
String ensemble2 = null;
ZKConfig.ZKClusterKey zkClusterKey = ZKConfig.transformClusterKey(key);
if (multiplePortSupport) {
 ensemble2 = ZKConfig.standardizeZKQuorumServerString(ensemble,

相关文章