Package com.sleepycat.je.log

Examples of com.sleepycat.je.log.ScavengerFileReader


        throws DatabaseException {

        committedTxnIdsSeen = new BitMap();
        lnNodesSeen = new TreeSet<CompareSlot>();

        final ScavengerFileReader scavengerReader =
            new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
                                    DbLsn.NULL_LSN, nextAvailableLsn) {
                protected void processEntryCallback(LogEntry entry,
                                                    LogEntryType entryType)
                    throws DatabaseException {

                    processDbTreeEntry(entry, entryType);
                }
            };

        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_COMMIT);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_ABORT);
        lastTime = System.currentTimeMillis();
        long fileNum = -1;
        while (scavengerReader.readNextEntry()) {
            fileNum = reportProgress(fileNum,
                                     scavengerReader.getLastLsn());
        }
    }
View Full Code Here


     * Pass 2: scavenge the regular (non-dbtree) environment.
     */
    private void scavenge(long lastUsedLsn, long nextAvailableLsn)
        throws DatabaseException {

        final ScavengerFileReader scavengerReader =
            new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
                                    DbLsn.NULL_LSN, nextAvailableLsn) {
                protected void processEntryCallback(LogEntry entry,
                                                    LogEntryType entryType)
                    throws DatabaseException {

                    processRegularEntry(entry, entryType);
                }
            };

        /*
         * Note: committed transaction id map has been created already, no
         * need to read TXN_COMMITS on this pass.
         */
        for (LogEntryType entryType : LogEntryType.getAllTypes()) {
            if (entryType.isUserLNType()) {
                scavengerReader.setTargetType(entryType);
            }
        }
        scavengerReader.setDumpCorruptedBounds(dumpCorruptedBounds);

        long progressFileNum = -1;
        while (scavengerReader.readNextEntry()) {
            progressFileNum = reportProgress(progressFileNum,
                                             scavengerReader.getLastLsn());
        }
    }
View Full Code Here

  throws IOException, DatabaseException {

  committedTxnIdsSeen = new BitMap();
  nodeIdsSeen = new BitMap();

  final ScavengerFileReader scavengerReader =
      new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
            DbLsn.NULL_LSN, nextAvailableLsn) {
    protected void processEntryCallback(LogEntry entry,
                LogEntryType entryType)
        throws DatabaseException {

        processDbTreeEntry(entry, entryType);
    }
      };

        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_COMMIT);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_ABORT);
  lastTime = System.currentTimeMillis();
  long fileNum = -1;
  while (scavengerReader.readNextEntry()) {
      fileNum = reportProgress(fileNum,
             scavengerReader.getLastLsn());
  }
    }
View Full Code Here

     * Pass 2: scavenge the regular (non-dbtree) environment.
     */
    private void scavenge(long lastUsedLsn, long nextAvailableLsn)
  throws IOException, DatabaseException {

  final ScavengerFileReader scavengerReader =
      new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
            DbLsn.NULL_LSN, nextAvailableLsn) {
    protected void processEntryCallback(LogEntry entry,
                LogEntryType entryType)
        throws DatabaseException {

        processRegularEntry(entry, entryType);
    }
      };

  /*
   * Note: committed transaction id map has been created already, no
   * need to read TXN_COMMITS on this pass.
   */
        scavengerReader.setTargetType(LogEntryType.LOG_LN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_LN);
        scavengerReader.setTargetType
      (LogEntryType.LOG_DEL_DUPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_DEL_DUPLN);
  scavengerReader.setDumpCorruptedBounds(dumpCorruptedBounds);

  long progressFileNum = -1;
  while (scavengerReader.readNextEntry()) {
      progressFileNum = reportProgress(progressFileNum,
                                             scavengerReader.getLastLsn());
  }
    }
View Full Code Here

  throws IOException, DatabaseException {

  committedTxnIdsSeen = new BitMap();
  nodeIdsSeen = new BitMap();

  final ScavengerFileReader scavengerReader =
      new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
            DbLsn.NULL_LSN, nextAvailableLsn) {
    protected void processEntryCallback(LogEntry entry,
                LogEntryType entryType)
        throws DatabaseException {

        processDbTreeEntry(entry, entryType);
    }
      };

        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_COMMIT);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_ABORT);
  lastTime = System.currentTimeMillis();
  long fileNum = -1;
  while (scavengerReader.readNextEntry()) {
      fileNum = reportProgress(fileNum,
             scavengerReader.getLastLsn());
  }
    }
View Full Code Here

     * Pass 2: scavenge the regular (non-dbtree) environment.
     */
    private void scavenge(long lastUsedLsn, long nextAvailableLsn)
  throws IOException, DatabaseException {

  final ScavengerFileReader scavengerReader =
      new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
            DbLsn.NULL_LSN, nextAvailableLsn) {
    protected void processEntryCallback(LogEntry entry,
                LogEntryType entryType)
        throws DatabaseException {

        processRegularEntry(entry, entryType);
    }
      };

  /*
   * Note: committed transaction id map has been created already, no
   * need to read TXN_COMMITS on this pass.
   */
        scavengerReader.setTargetType(LogEntryType.LOG_LN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_LN);
        scavengerReader.setTargetType
      (LogEntryType.LOG_DEL_DUPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_DEL_DUPLN);
  scavengerReader.setDumpCorruptedBounds(dumpCorruptedBounds);

  long progressFileNum = -1;
  while (scavengerReader.readNextEntry()) {
      progressFileNum = reportProgress(progressFileNum,
                                             scavengerReader.getLastLsn());
  }
    }
View Full Code Here

     * Pass 2: scavenge the regular (non-dbtree) environment.
     */
    private void scavenge(long lastUsedLsn, long nextAvailableLsn)
        throws DatabaseException {

        final ScavengerFileReader scavengerReader =
            new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
                                    DbLsn.NULL_LSN, nextAvailableLsn) {
                protected void processEntryCallback(LogEntry entry,
                                                    LogEntryType entryType)
                    throws DatabaseException {

                    processRegularEntry(entry, entryType);
                }
            };

        /*
         * Note: committed transaction id map has been created already, no
         * need to read TXN_COMMITS on this pass.
         */
        scavengerReader.setTargetType(LogEntryType.LOG_LN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_LN);
        scavengerReader.setTargetType
            (LogEntryType.LOG_DEL_DUPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_DEL_DUPLN);
        scavengerReader.setDumpCorruptedBounds(dumpCorruptedBounds);

        long progressFileNum = -1;
        while (scavengerReader.readNextEntry()) {
            progressFileNum = reportProgress(progressFileNum,
                                             scavengerReader.getLastLsn());
        }
    }
View Full Code Here

        throws DatabaseException {

        committedTxnIdsSeen = new BitMap();
        nodeIdsSeen = new BitMap();

        final ScavengerFileReader scavengerReader =
            new ScavengerFileReader(envImpl, readBufferSize, lastUsedLsn,
                                    DbLsn.NULL_LSN, nextAvailableLsn) {
                protected void processEntryCallback(LogEntry entry,
                                                    LogEntryType entryType)
                    throws DatabaseException {

                    processDbTreeEntry(entry, entryType);
                }
            };

        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_MAPLN);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN_TRANSACTIONAL);
        scavengerReader.setTargetType(LogEntryType.LOG_NAMELN);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_COMMIT);
        scavengerReader.setTargetType(LogEntryType.LOG_TXN_ABORT);
        lastTime = System.currentTimeMillis();
        long fileNum = -1;
        while (scavengerReader.readNextEntry()) {
            fileNum = reportProgress(fileNum,
                                     scavengerReader.getLastLsn());
        }
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.log.ScavengerFileReader

Copyright © 2018 www.massapicom. 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.