public Boolean canRollBack(StorageInfo storage, StorageInfo prevStorage, int targetLayoutVersion) throws IOException { return this.storage.getJournalManager().canRollBack(storage, prevStorage, targetLayoutVersion); }
public Long getJournalCTime() throws IOException { return storage.getJournalManager().getJournalCTime(); } }
public synchronized void doPreUpgrade() throws IOException { // Do not hold file lock on committedTxnId, because the containing // directory will be renamed. It will be reopened lazily on next access. IOUtils.cleanupWithLogger(LOG, committedTxnId); storage.getJournalManager().doPreUpgrade(); }
public synchronized void doRollback() throws IOException { // Do not hold file lock on committedTxnId, because the containing // directory will be renamed. It will be reopened lazily on next access. IOUtils.cleanupWithLogger(LOG, committedTxnId); storage.getJournalManager().doRollback(); }
synchronized void discardSegments(long startTxId) throws IOException { storage.getJournalManager().discardSegments(startTxId); // we delete all the segments after the startTxId. let's reset committedTxnId committedTxnId.set(startTxId - 1); }
public synchronized void doFinalize() throws IOException { LOG.info("Finalizing upgrade for journal " + storage.getRoot() + "." + (storage.getLayoutVersion()==0 ? "" : "\n cur LV = " + storage.getLayoutVersion() + "; cur CTime = " + storage.getCTime())); storage.getJournalManager().doFinalize(); }
Journal(Configuration conf, File logDir, String journalId, StartupOption startOpt, StorageErrorReporter errorReporter) throws IOException { storage = new JNStorage(conf, logDir, startOpt, errorReporter); this.journalId = journalId; refreshCachedData(); this.fjm = storage.getJournalManager(); this.metrics = JournalMetrics.create(this); EditLogFile latest = scanStorageForLatestEdits(); if (latest != null) { updateHighestWrittenTxId(latest.getLastTxId()); } }
+ ".\n new LV = " + storage.getLayoutVersion() + "; new CTime = " + storage.getCTime()); storage.getJournalManager().doUpgrade(storage); storage.createPaxosDir();
SEGMENT_TXID_PARAM); FileJournalManager fjm = storage.getJournalManager(); File editFile;
public Boolean canRollBack(StorageInfo storage, StorageInfo prevStorage, int targetLayoutVersion) throws IOException { return this.storage.getJournalManager().canRollBack(storage, prevStorage, targetLayoutVersion); }
public Boolean canRollBack(StorageInfo storage, StorageInfo prevStorage, int targetLayoutVersion) throws IOException { return this.storage.getJournalManager().canRollBack(storage, prevStorage, targetLayoutVersion); }
synchronized void discardSegments(long startTxId) throws IOException { storage.getJournalManager().discardSegments(startTxId); // we delete all the segments after the startTxId. let's reset committedTxnId committedTxnId.set(startTxId - 1); }
public synchronized void doRollback() throws IOException { // Do not hold file lock on committedTxnId, because the containing // directory will be renamed. It will be reopened lazily on next access. IOUtils.cleanup(LOG, committedTxnId); storage.getJournalManager().doRollback(); }
synchronized void discardSegments(long startTxId) throws IOException { storage.getJournalManager().discardSegments(startTxId); // we delete all the segments after the startTxId. let's reset committedTxnId committedTxnId.set(startTxId - 1); }
public synchronized void doPreUpgrade() throws IOException { // Do not hold file lock on committedTxnId, because the containing // directory will be renamed. It will be reopened lazily on next access. IOUtils.cleanup(LOG, committedTxnId); storage.getJournalManager().doPreUpgrade(); }
public synchronized void doRollback() throws IOException { // Do not hold file lock on committedTxnId, because the containing // directory will be renamed. It will be reopened lazily on next access. IOUtils.cleanup(LOG, committedTxnId); storage.getJournalManager().doRollback(); }
public synchronized void doPreUpgrade() throws IOException { // Do not hold file lock on committedTxnId, because the containing // directory will be renamed. It will be reopened lazily on next access. IOUtils.cleanup(LOG, committedTxnId); storage.getJournalManager().doPreUpgrade(); }
public synchronized void doFinalize() throws IOException { LOG.info("Finalizing upgrade for journal " + storage.getRoot() + "." + (storage.getLayoutVersion()==0 ? "" : "\n cur LV = " + storage.getLayoutVersion() + "; cur CTime = " + storage.getCTime())); storage.getJournalManager().doFinalize(); }
Journal(Configuration conf, File logDir, String journalId, StartupOption startOpt, StorageErrorReporter errorReporter) throws IOException { storage = new JNStorage(conf, logDir, startOpt, errorReporter); this.journalId = journalId; refreshCachedData(); this.fjm = storage.getJournalManager(); this.metrics = JournalMetrics.create(this); EditLogFile latest = scanStorageForLatestEdits(); if (latest != null) { highestWrittenTxId = latest.getLastTxId(); } }
public synchronized void doFinalize() throws IOException { LOG.info("Finalizing upgrade for journal " + storage.getRoot() + "." + (storage.getLayoutVersion()==0 ? "" : "\n cur LV = " + storage.getLayoutVersion() + "; cur CTime = " + storage.getCTime())); storage.getJournalManager().doFinalize(); }