Examples of EditLogLedgerMetadataWritable


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

    String fullyQualifiedInProgressPath =
        fullyQualifiedPathForLedger(nameForLedger(firstTxId, -1));
    // TODO: try using a ThreadLocal here as well. Will test this once unit
    // test is written for this method
    Stat stat = new Stat();
    EditLogLedgerMetadataWritable metadataWritable = readWritableFromZk(
        fullyQualifiedInProgressPath, localWritable.get(), stat);
    return metadataWritable == null ?
        null : Versioned.of(stat.getVersion(), metadataWritable.get());
  }
View Full Code Here

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

   * @throws IOException If there as an unrecoverable error communicating with
   *                     ZooKeeper
   */
  public EditLogLedgerMetadata readEditLogLedgerMetadata(
      String fullyQualifiedPath) throws IOException {
    EditLogLedgerMetadataWritable writable = localWritable.get();
    writable = readWritableFromZk(fullyQualifiedPath, writable, null);
    return writable == null ? null : writable.get();
  }
View Full Code Here

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

      EditLogLedgerMetadata editLogLedgerMetadata) throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Attempting to write " + editLogLedgerMetadata + " to " +
          fullyQualifiedPath);
    }
    EditLogLedgerMetadataWritable writable = localWritable.get();
    writable.set(editLogLedgerMetadata);
    byte[] data = WritableUtil.writableToByteArray(writable);
    try {
      if (zooKeeper.exists(fullyQualifiedPath, false) != null) {
        LOG.warn(fullyQualifiedPath + " already exists. Will not override!");
        return false;
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.