com.moz.fiji.schema.zookeeper.ZooKeeperUtils.getZooKeeperClient()方法的使用及代码示例

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

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

ZooKeeperUtils.getZooKeeperClient介绍

[英]Create a new ZooKeeper client for the cluster hosting the provided Fiji. The returned client is already started, but the caller is responsible for closing it. The returned client may share an underlying connection, therefore this method is not suitable if closing the client must deterministically close outstanding session-based ZooKeeper items such as ephemeral nodes or watchers.
[中]为托管所提供数据的集群创建一个新的ZooKeeper客户端。返回的客户端已经启动,但调用方负责关闭它。返回的客户端可能共享一个底层连接,因此,如果关闭客户端必须决定性地关闭未完成的基于会话的ZooKeeper项,例如临时节点或观察者,则此方法不适用。

代码示例

代码示例来源:origin: com.moz.fiji.schema/fiji-schema

/**
 * Create a new ZooKeeper client for the cluster hosting the provided Fiji. The returned client is
 * already started, but the caller is responsible for closing it.  The returned client *may* share
 * an underlying connection, therefore this method is not suitable if closing the client must
 * deterministically close outstanding session-based ZooKeeper items such as ephemeral nodes
 * or watchers.
 *
 * @param clusterURI of cluster to connect to. May not be null.
 * @return a ZooKeeper client using the new connection.
 */
public static CuratorFramework getZooKeeperClient(FijiURI clusterURI) {
 return getZooKeeperClient(clusterURI.getZooKeeperEnsemble());
}

代码示例来源:origin: com.moz.fiji.rest/fiji-rest-lib

throws IOException {
mVisibleFijiInstances = visibleInstances;
mZKFramework = ZooKeeperUtils.getZooKeeperClient(clusterURI);
mZKInstances =
  new PathChildrenCache(

代码示例来源:origin: com.moz.fiji.schema/fiji-schema

final CuratorFramework zkClient = ZooKeeperUtils.getZooKeeperClient(mZKEnsemble);
try {
 getPrintStream().println("Fiji Services:");

代码示例来源:origin: com.moz.fiji.schema/fiji-schema

/**
 * Open a connection to the HBase schema table for a Fiji instance.
 *
 * @param fijiURI the FijiURI
 * @param conf The Hadoop configuration.
 * @param tableFactory HTableInterface factory.
 * @throws IOException on I/O error.
 */
public HBaseSchemaTable(
  FijiURI fijiURI,
  Configuration conf,
  HTableInterfaceFactory tableFactory
) throws IOException {
 mURI = fijiURI;
 mSchemaHashTable = newSchemaHashTable(mURI, conf, tableFactory);
 mSchemaIdTable = newSchemaIdTable(mURI, conf, tableFactory);
 mZKClient = ZooKeeperUtils.getZooKeeperClient(mURI);
 mZKLock = new ZooKeeperLock(mZKClient, ZooKeeperUtils.getSchemaTableLock(mURI));
 final State oldState = mState.getAndSet(State.OPEN);
 Preconditions.checkState(oldState == State.UNINITIALIZED,
   "Cannot open SchemaTable instance in state %s.", oldState);
 ResourceTracker.get().registerResource(this);
}

代码示例来源:origin: com.moz.fiji.schema/fiji-schema

final HBaseAdminFactory adminFactory
) throws IOException {
 final CuratorFramework zkClient = ZooKeeperUtils.getZooKeeperClient(uri);
 final String instanceZKPath = ZooKeeperUtils.getInstanceDir(uri).getPath();
 try {

代码示例来源:origin: com.moz.fiji.schema/fiji-schema-cassandra

mZKClient = ZooKeeperUtils.getZooKeeperClient(mURI);
} else {

代码示例来源:origin: com.moz.fiji.schema/fiji-schema

mZKClient = ZooKeeperUtils.getZooKeeperClient(mURI);
} else {

代码示例来源:origin: com.moz.fiji.schema/fiji-schema-cassandra

throw new FijiNotInstalledException("Schema counter table not installed.", instanceURI);
mZKClient = ZooKeeperUtils.getZooKeeperClient(instanceURI.getZooKeeperEnsemble());
mZKLock = new ZooKeeperLock(mZKClient, ZooKeeperUtils.getSchemaTableLock(mInstanceURI));

代码示例来源:origin: com.moz.fiji.schema/fiji-schema

.create(conf, AccessControlLists.ACL_TABLE_NAME.getNameAsString());
mZKClient = ZooKeeperUtils.getZooKeeperClient(mInstanceUri);
mLock = new ZooKeeperLock(mZKClient, ZooKeeperUtils.getInstancePermissionsLock(instanceUri));

相关文章