Examples of CurrentInProgressMetadataWritable


Examples of org.apache.hadoop.hdfs.server.namenode.bookkeeper.metadata.proto.CurrentInProgressMetadataWritable

          e);
    }
    if (alreadyExists) {
      // If the znode already exists, read it, print the owner information and
      // update the version number from znode's stat
      CurrentInProgressMetadataWritable owner = localWritable.get();
      if (readAndUpdateVersion(owner)) {
        LOG.info(fullyQualifiedZNode + " held by " + owner.getId() +
            " and points to " + owner.getPath());
      } else {
        LOG.info(fullyQualifiedZNode + " is currently clear.");
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.bookkeeper.metadata.proto.CurrentInProgressMetadataWritable

   *                               version in ZooKeeper
   * @throws IOException If there is an error talking to ZooKeeper
   */
  public void update(String newPath) throws IOException {
    String id = hostname + Thread.currentThread().getId();
    CurrentInProgressMetadataWritable cip = localWritable.get();
    cip.set(id, newPath);
    byte[] data = WritableUtil.writableToByteArray(cip);
    try {
      zooKeeper.setData(fullyQualifiedZNode, data, expectedZNodeVersion.get());
      if (LOG.isDebugEnabled()) {
        LOG.debug("Set " + fullyQualifiedZNode + " to point to " + newPath);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.bookkeeper.metadata.proto.CurrentInProgressMetadataWritable

   * @return Full path to the ledger's metadata ZNode or null if no
   *         segment is in progress
   * @throws IOException If there is an error talking to ZooKeeper
   */
  public String read() throws IOException {
    CurrentInProgressMetadataWritable cip = localWritable.get();
    if (readAndUpdateVersion(cip)) {
      return cip.getPath();
    } else {
      if (LOG.isDebugEnabled()) {
        LOG.debug(fullyQualifiedZNode + " is currently clear.");
      }
    }
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.