- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZNodePaths.joinZNode()
方法的一些代码示例,展示了ZNodePaths.joinZNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZNodePaths.joinZNode()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZNodePaths
类名称:ZNodePaths
方法名:joinZNode
[英]Join the prefix znode name with the suffix znode name to generate a proper full znode name.
Assumes prefix does not end with slash and suffix does not begin with it.
[中]将前缀znode name与后缀znode name连接起来,以生成正确的znode全名。
假设前缀不以斜杠结尾,后缀不以斜杠开头。
代码示例来源:origin: apache/hbase
/**
* Get the full znode path for the node used by the coordinator to trigger a global barrier
* execution and release on each subprocedure.
* @param controller controller running the procedure
* @param opInstanceName name of the running procedure instance (not the procedure description).
* @return full znode path to the commit barrier
*/
public static String getReachedBarrierNode(ZKProcedureUtil controller,
String opInstanceName) {
return ZNodePaths.joinZNode(controller.reachedZnode, opInstanceName);
}
代码示例来源:origin: apache/hbase
/**
* Get the full znode path for the node used by the coordinator to trigger a global barrier
* acquire on each subprocedure.
* @param controller controller running the procedure
* @param opInstanceName name of the running procedure instance (not the procedure description).
* @return full znode path to the prepare barrier/start node
*/
public static String getAcquireBarrierNode(ZKProcedureUtil controller,
String opInstanceName) {
return ZNodePaths.joinZNode(controller.acquiredZnode, opInstanceName);
}
代码示例来源:origin: apache/hbase
/**
* Get the full znode path for the node used by the coordinator or member to trigger an abort
* of the global barrier acquisition or execution in subprocedures.
* @param controller controller running the procedure
* @param opInstanceName name of the running procedure instance (not the procedure description).
* @return full znode path to the abort znode
*/
public static String getAbortNode(ZKProcedureUtil controller, String opInstanceName) {
return ZNodePaths.joinZNode(controller.abortZnode, opInstanceName);
}
代码示例来源:origin: apache/hbase
/**
* Get the zookeeper node associated with archiving the given table
* @param table name of the table to check
* @return znode for the table's archive status
*/
private String getTableNode(byte[] table) {
return ZNodePaths.joinZNode(archiveZnode, Bytes.toString(table));
}
}
代码示例来源:origin: apache/hbase
public ZKReplicationQueueStorage(ZKWatcher zookeeper, Configuration conf) {
super(zookeeper, conf);
String queuesZNodeName = conf.get("zookeeper.znode.replication.rs", "rs");
String hfileRefsZNodeName = conf.get(ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_KEY,
ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_DEFAULT);
this.queuesZNode = ZNodePaths.joinZNode(replicationZNode, queuesZNodeName);
this.hfileRefsZNode = ZNodePaths.joinZNode(replicationZNode, hfileRefsZNodeName);
this.regionsZNode = ZNodePaths.joinZNode(replicationZNode, conf
.get(ZOOKEEPER_ZNODE_REPLICATION_REGIONS_KEY, ZOOKEEPER_ZNODE_REPLICATION_REGIONS_DEFAULT));
}
代码示例来源:origin: apache/hbase
public ZKReplicationPeerStorage(ZKWatcher zookeeper, Configuration conf) {
super(zookeeper, conf);
this.peerStateNodeName = conf.get(PEERS_STATE_ZNODE, PEERS_STATE_ZNODE_DEFAULT);
String peersZNodeName = conf.get(PEERS_ZNODE, PEERS_ZNODE_DEFAULT);
this.peersZNode = ZNodePaths.joinZNode(replicationZNode, peersZNodeName);
}
代码示例来源:origin: apache/hbase
public ZKSecretWatcher(Configuration conf,
ZKWatcher watcher,
AuthenticationTokenSecretManager secretManager) {
super(watcher);
this.secretManager = secretManager;
String keyZNodeParent = conf.get("zookeeper.znode.tokenauth.parent", DEFAULT_ROOT_NODE);
this.baseKeyZNode = ZNodePaths.joinZNode(watcher.getZNodePaths().baseZNode, keyZNodeParent);
this.keysParentZNode = ZNodePaths.joinZNode(baseKeyZNode, DEFAULT_KEYS_PARENT);
}
代码示例来源:origin: apache/hbase
@VisibleForTesting
protected String getTableCFsNode(String peerId) {
String replicationZNode = ZNodePaths.joinZNode(zookeeper.getZNodePaths().baseZNode,
conf.get(REPLICATION_ZNODE, REPLICATION_ZNODE_DEFAULT));
String peersZNode =
ZNodePaths.joinZNode(replicationZNode, conf.get(PEERS_ZNODE, PEERS_ZNODE_DEFAULT));
return ZNodePaths.joinZNode(peersZNode,
ZNodePaths.joinZNode(peerId, conf.get(TABLE_CFS_ZNODE, TABLE_CFS_ZNODE_DEFAULT)));
}
代码示例来源:origin: apache/hbase
/**
* @param conf conf to read for the base archive node
* @param zooKeeper zookeeper to used for building the full path
* @return get the znode for long-term archival of a table for
*/
public static String getArchiveZNode(Configuration conf, ZKWatcher zooKeeper) {
return ZNodePaths.joinZNode(zooKeeper.getZNodePaths().baseZNode, conf.get(
ZOOKEEPER_ZNODE_HFILE_ARCHIVE_KEY, TableHFileArchiveTracker.HFILE_ARCHIVE_ZNODE_PARENT));
}
}
代码示例来源:origin: apache/hbase
protected ZKReplicationStorageBase(ZKWatcher zookeeper, Configuration conf) {
this.zookeeper = zookeeper;
this.conf = conf;
this.replicationZNode = ZNodePaths.joinZNode(this.zookeeper.getZNodePaths().baseZNode,
conf.get(REPLICATION_ZNODE, REPLICATION_ZNODE_DEFAULT));
}
代码示例来源:origin: apache/hbase
public ZKVisibilityLabelWatcher(ZKWatcher watcher, VisibilityLabelsCache labelsCache,
Configuration conf) {
super(watcher);
this.labelsCache = labelsCache;
String labelZnodeParent = conf.get(VISIBILITY_LABEL_ZK_PATH, DEFAULT_VISIBILITY_LABEL_NODE);
String userAuthsZnodeParent = conf.get(VISIBILITY_USER_AUTHS_ZK_PATH,
DEFAULT_VISIBILITY_USER_AUTHS_NODE);
this.labelZnode = ZNodePaths.joinZNode(watcher.getZNodePaths().baseZNode, labelZnodeParent);
this.userAuthsZnode = ZNodePaths.joinZNode(watcher.getZNodePaths().baseZNode,
userAuthsZnodeParent);
}
代码示例来源:origin: apache/hbase
public RpcThrottleStorage(ZKWatcher zookeeper, Configuration conf) {
this.zookeeper = zookeeper;
this.rpcThrottleZNode = ZNodePaths.joinZNode(zookeeper.getZNodePaths().baseZNode,
conf.get(RPC_THROTTLE_ZNODE, RPC_THROTTLE_ZNODE_DEFAULT));
}
代码示例来源:origin: apache/hbase
@VisibleForTesting
public String getPeerNode(String peerId) {
return ZNodePaths.joinZNode(peersZNode, peerId);
}
代码示例来源:origin: apache/hbase
public ZKPermissionWatcher(ZKWatcher watcher,
AuthManager authManager, Configuration conf) {
super(watcher);
this.authManager = authManager;
String aclZnodeParent = conf.get("zookeeper.znode.acl.parent", ACL_NODE);
this.aclZNode = ZNodePaths.joinZNode(watcher.getZNodePaths().baseZNode, aclZnodeParent);
executor = Executors.newSingleThreadExecutor(
new DaemonThreadFactory("zk-permission-watcher"));
}
代码示例来源:origin: apache/hbase
/**
* Gets the full path node name for the log file being split.
* This method will url encode the filename.
* @param zkw zk reference
* @param filename log file name (only the basename)
*/
public static String getEncodedNodeName(ZKWatcher zkw, String filename) {
return ZNodePaths.joinZNode(zkw.getZNodePaths().splitLogZNode, encode(filename));
}
代码示例来源:origin: apache/hbase
@VisibleForTesting
public String getPeerStateNode(String peerId) {
return ZNodePaths.joinZNode(getPeerNode(peerId), peerStateNodeName);
}
代码示例来源:origin: apache/hbase
@VisibleForTesting
public String getSyncReplicationStateNode(String peerId) {
return ZNodePaths.joinZNode(getPeerNode(peerId), SYNC_REPLICATION_STATE_ZNODE);
}
代码示例来源:origin: apache/hbase
public LeaderElector(ZKWatcher watcher, String serverName) {
setDaemon(true);
setName("ZKSecretWatcher-leaderElector");
zkLeader = new ZKLeaderManager(watcher,
ZNodePaths.joinZNode(zkWatcher.getRootKeyZNode(), "keymaster"),
Bytes.toBytes(serverName), this);
}
代码示例来源:origin: apache/hbase
private static String initPeerClusterState(String baseZKNode)
throws IOException, KeeperException {
// Add a dummy region server and set up the cluster id
Configuration testConf = new Configuration(conf);
testConf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, baseZKNode);
ZKWatcher zkw1 = new ZKWatcher(testConf, "test1", null);
String fakeRs = ZNodePaths.joinZNode(zkw1.getZNodePaths().rsZNode,
"hostname1.example.org:1234");
ZKUtil.createWithParents(zkw1, fakeRs);
ZKClusterId.setClusterId(zkw1, new ClusterId());
return ZKConfig.getZooKeeperClusterKey(testConf);
}
代码示例来源:origin: apache/hbase
@BeforeClass
public static void setUpBeforeClass() throws Exception {
utility = new HBaseZKTestingUtility();
utility.startMiniZKCluster();
conf = utility.getConfiguration();
conf.setBoolean(HConstants.REPLICATION_BULKLOAD_ENABLE_KEY, true);
zkw = utility.getZooKeeperWatcher();
String replicationZNodeName = conf.get("zookeeper.znode.replication", "replication");
replicationZNode = ZNodePaths.joinZNode(zkw.getZNodePaths().baseZNode, replicationZNodeName);
KEY_ONE = initPeerClusterState("/hbase1");
KEY_TWO = initPeerClusterState("/hbase2");
}
本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZNodePaths.joinZNode()方法的一些代码示例,展示了ZNodePaths.joinZNode(
本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKUtil.joinZNode()方法的一些代码示例,展示了ZKUtil.joinZNode()的具体用法。这
我是一名优秀的程序员,十分优秀!