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

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

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

ZooKeeperUtils.getSchemaTableLock介绍

[英]Reports the path of the ZooKeeper node for schema table lock.
[中]报告模式表锁的ZooKeeper节点的路径。

代码示例

代码示例来源: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-cassandra

mZKLock = new ZooKeeperLock(mZKClient, ZooKeeperUtils.getSchemaTableLock(mInstanceURI));

相关文章