Examples of PersistentLongFile


Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   
    // Copy over the contents of the epoch data files to the new dir.
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    File previousDir = storage.getSingularStorageDir().getPreviousDir();
   
    PersistentLongFile prevLastPromisedEpoch = new PersistentLongFile(
        new File(previousDir, LAST_PROMISED_FILENAME), 0);
    PersistentLongFile prevLastWriterEpoch = new PersistentLongFile(
        new File(previousDir, LAST_WRITER_EPOCH), 0);
   
    lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
   
    lastPromisedEpoch.set(prevLastPromisedEpoch.get());
    lastWriterEpoch.set(prevLastWriterEpoch.get());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = storage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

          Journal.LAST_WRITER_EPOCH }) {
        File prevFile = new File(prevDir, fileName);
        // Possible the prev file doesn't exist, e.g. if there has never been a
        // writer before the upgrade.
        if (prevFile.exists()) {
          PersistentLongFile prevLongFile = new PersistentLongFile(prevFile, -10);
          PersistentLongFile currLongFile = new PersistentLongFile(new File(currDir,
              fileName), -11);
          assertTrue("Value in " + fileName + " has decreased on upgrade in "
              + journalDir, prevLongFile.get() <= currLongFile.get());
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.PersistentLongFile

   */
  private synchronized void refreshCachedData() throws IOException {
    IOUtils.closeStream(committedTxnId);
   
    File currentDir = journalStorage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
    metrics.lastWriterEpoch.set(lastWriterEpoch.get());
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.