public void archive() throws IOException { if (loaded.get()) { throw new IllegalStateException("Cannot delete page file data when the page file is loaded"); } long timestamp = System.currentTimeMillis(); archive(getMainPageFile(), String.valueOf(timestamp)); archive(getFreeFile(), String.valueOf(timestamp)); archive(getRecoveryFile(), String.valueOf(timestamp)); }
public void open() throws IOException { if( opened.compareAndSet(false, true) ) { getJournal().start(); try { loadPageFile(); } catch (Throwable t) { LOG.warn("Index corrupted. Recovering the index through journal replay. Cause:" + t); if (LOG.isDebugEnabled()) { LOG.debug("Index load failure", t); } // try to recover index try { pageFile.unload(); } catch (Exception ignore) {} if (archiveCorruptedIndex) { pageFile.archive(); } else { pageFile.delete(); } metadata = createMetadata(); //The metadata was recreated after a detect corruption so we need to //reconfigure anything that was configured on the old metadata on startup configureMetadata(); pageFile = null; loadPageFile(); } recover(); startCheckpoint(); } }
pageFile.archive(); } else { pageFile.delete();
public void archive() throws IOException { if (loaded.get()) { throw new IllegalStateException("Cannot delete page file data when the page file is loaded"); } long timestamp = System.currentTimeMillis(); archive(getMainPageFile(), String.valueOf(timestamp)); archive(getFreeFile(), String.valueOf(timestamp)); archive(getRecoveryFile(), String.valueOf(timestamp)); }
public void archive() throws IOException { if (loaded.get()) { throw new IllegalStateException("Cannot delete page file data when the page file is loaded"); } long timestamp = System.currentTimeMillis(); archive(getMainPageFile(), String.valueOf(timestamp)); archive(getFreeFile(), String.valueOf(timestamp)); archive(getRecoveryFile(), String.valueOf(timestamp)); }
public void archive() throws IOException { if (loaded.get()) { throw new IllegalStateException("Cannot delete page file data when the page file is loaded"); } long timestamp = System.currentTimeMillis(); archive(getMainPageFile(), String.valueOf(timestamp)); archive(getFreeFile(), String.valueOf(timestamp)); archive(getRecoveryFile(), String.valueOf(timestamp)); }
public void open() throws IOException { if( opened.compareAndSet(false, true) ) { getJournal().start(); try { loadPageFile(); } catch (Throwable t) { LOG.warn("Index corrupted. Recovering the index through journal replay. Cause:" + t); if (LOG.isDebugEnabled()) { LOG.debug("Index load failure", t); } // try to recover index try { pageFile.unload(); } catch (Exception ignore) {} if (archiveCorruptedIndex) { pageFile.archive(); } else { pageFile.delete(); } metadata = createMetadata(); //The metadata was recreated after a detect corruption so we need to //reconfigure anything that was configured on the old metadata on startup configureMetadata(); pageFile = null; loadPageFile(); } recover(); startCheckpoint(); } }
public void open() throws IOException { if( opened.compareAndSet(false, true) ) { getJournal().start(); try { loadPageFile(); } catch (Throwable t) { LOG.warn("Index corrupted. Recovering the index through journal replay. Cause:" + t); if (LOG.isDebugEnabled()) { LOG.debug("Index load failure", t); } // try to recover index try { pageFile.unload(); } catch (Exception ignore) {} if (archiveCorruptedIndex) { pageFile.archive(); } else { pageFile.delete(); } metadata = createMetadata(); //The metadata was recreated after a detect corruption so we need to //reconfigure anything that was configured on the old metadata on startup configureMetadata(); pageFile = null; loadPageFile(); } recover(); startCheckpoint(); } }
public void open() throws IOException { if( opened.compareAndSet(false, true) ) { getJournal().start(); try { loadPageFile(); } catch (Throwable t) { LOG.warn("Index corrupted. Recovering the index through journal replay. Cause:" + t); if (LOG.isDebugEnabled()) { LOG.debug("Index load failure", t); } // try to recover index try { pageFile.unload(); } catch (Exception ignore) {} if (archiveCorruptedIndex) { pageFile.archive(); } else { pageFile.delete(); } metadata = createMetadata(); //The metadata was recreated after a detect corruption so we need to //reconfigure anything that was configured on the old metadata on startup configureMetadata(); pageFile = null; loadPageFile(); } recover(); startCheckpoint(); } }
pageFile.archive(); } else { pageFile.delete();
pageFile.archive(); } else { pageFile.delete();
pageFile.archive(); } else { pageFile.delete();