Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.InterProcessReadWriteLock.readLock()


          .setCreateTime(EnvironmentEdgeManager.currentTimeMillis()).build();
        byte[] lockMetadata = toBytes(data);

        InterProcessReadWriteLock lock = new ZKInterProcessReadWriteLock(zkWatcher, tableLockZNode,
          METADATA_HANDLER);
        return isShared ? lock.readLock(lockMetadata) : lock.writeLock(lockMetadata);
      }
    }

    private static byte[] toBytes(ZooKeeperProtos.TableLock data) {
      return ProtobufUtil.prependPBMagic(data.toByteArray());
View Full Code Here


          .setIsShared(isShared).build();
        byte[] lockMetadata = toBytes(data);

        InterProcessReadWriteLock lock = new ZKInterProcessReadWriteLock(zkWatcher, tableLockZNode,
          METADATA_HANDLER);
        return isShared ? lock.readLock(lockMetadata) : lock.writeLock(lockMetadata);
      }
    }

    private static byte[] toBytes(ZooKeeperProtos.TableLock data) {
      return ProtobufUtil.prependPBMagic(data.toByteArray());
View Full Code Here

          .setCreateTime(EnvironmentEdgeManager.currentTime()).build();
        byte[] lockMetadata = toBytes(data);

        InterProcessReadWriteLock lock = new ZKInterProcessReadWriteLock(zkWatcher, tableLockZNode,
          METADATA_HANDLER);
        return isShared ? lock.readLock(lockMetadata) : lock.writeLock(lockMetadata);
      }
    }

    private static byte[] toBytes(ZooKeeperProtos.TableLock data) {
      return ProtobufUtil.prependPBMagic(data.toByteArray());
View Full Code Here

          .setCreateTime(EnvironmentEdgeManager.currentTimeMillis()).build();
        byte[] lockMetadata = toBytes(data);

        InterProcessReadWriteLock lock = new ZKInterProcessReadWriteLock(zkWatcher, tableLockZNode,
          METADATA_HANDLER);
        return isShared ? lock.readLock(lockMetadata) : lock.writeLock(lockMetadata);
      }
    }

    private static byte[] toBytes(ZooKeeperProtos.TableLock data) {
      return ProtobufUtil.prependPBMagic(data.toByteArray());
View Full Code Here

          .setCreateTime(EnvironmentEdgeManager.currentTime()).build();
        byte[] lockMetadata = toBytes(data);

        InterProcessReadWriteLock lock = new ZKInterProcessReadWriteLock(zkWatcher, tableLockZNode,
          METADATA_HANDLER);
        return isShared ? lock.readLock(lockMetadata) : lock.writeLock(lockMetadata);
      }
    }

    private static byte[] toBytes(ZooKeeperProtos.TableLock data) {
      return ProtobufUtil.prependPBMagic(data.toByteArray());
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.