Examples of ZooKeeperLock


Examples of org.kiji.schema.util.ZooKeeperLock

   * @return a Lock for the table with the specified URI.
   *     The lock is not acquired at this point: the user must calli {@code Lock.lock()} and then
   *     release the lock with {@code Lock.unlock()}.
   */
  public Lock newTableLayoutUpdateLock(KijiURI tableURI) {
    return new ZooKeeperLock(this.mZKClient, getTableLayoutUpdateLock(tableURI));
  }
View Full Code Here

Examples of org.kiji.schema.zookeeper.ZooKeeperLock

    // Get the access control table.
    mAccessControlTable = tableFactory
        .create(conf, AccessControlLists.ACL_TABLE_NAME.getNameAsString());

    mZKClient = ZooKeeperUtils.getZooKeeperClient(mInstanceUri);
    mLock = new ZooKeeperLock(mZKClient, ZooKeeperUtils.getInstancePermissionsLock(instanceUri));
  }
View Full Code Here

Examples of org.kiji.schema.zookeeper.ZooKeeperLock

  ) throws IOException {
    mURI = kijiURI;
    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);
    DebugResourceTracker.get().registerResource(this);
View Full Code Here

Examples of org.kiji.schema.zookeeper.ZooKeeperLock

    }
    if (!mAdmin.tableExists(mCounterTable)) {
      throw new KijiNotInstalledException("Schema counter table not installed.", instanceURI);
    }
    mZKClient = ZooKeeperUtils.getZooKeeperClient(instanceURI.getZooKeeperEnsemble());
    mZKLock = new ZooKeeperLock(mZKClient, ZooKeeperUtils.getSchemaTableLock(mInstanceURI));

    final State oldState = mState.getAndSet(State.OPEN);
    Preconditions.checkState(oldState == State.UNINITIALIZED,
        "Cannot open SchemaTable instance in state %s.", oldState);
    DebugResourceTracker.get().registerResource(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.