com.sleepycat.je.log
Class UtilizationFileReader
java.lang.Object
com.sleepycat.je.log.FileReader
com.sleepycat.je.log.UtilizationFileReader
public class UtilizationFileReader
- extends FileReader
Summarizes the utilized and unutilized portion of each log file by examining
each log entry. Does not use the Cleaner UtilizationProfile information in
order to provide a second measure against which to evaluation the
UtilizationProfile accuracy.
Limitations
===========
BINDeltas are all considered obsolete, because we would have to model the
Btree differently to count them accurately. We would need the ability to
lookup an IN by LSN, since the delta does not contain the node ID.
Holds memory for all active LNs, i.e., a duplication of what is in the
Btree.
Holds memory for txns with no abort or commit entry until the end of the
run. Could consider these txns to be aborted when a recovery is
encountered, if we can recognize a recovery.
Relies on the live Btree to get Database information -- whether dups are
configured and whether the database is deleted -- rather than reading the
log, which would require a separate initial pass. Because of cleaner
migration, we can't rely on a database's MapLN preceding the other log
entries in the database.
Fields inherited from class com.sleepycat.je.log.FileReader |
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window |
Methods inherited from class com.sleepycat.je.log.FileReader |
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntry, threadSafeBufferFlip, threadSafeBufferPosition, threadSafeBufferPosition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isTargetEntry
protected boolean isTargetEntry()
- Overrides:
isTargetEntry
in class FileReader
- Returns:
- true if this reader should process this entry, or just
skip over it.
processEntry
protected boolean processEntry(ByteBuffer entryBuffer)
throws DatabaseException
- Description copied from class:
FileReader
- Each file reader implements this method to process the entry data.
- Specified by:
processEntry
in class FileReader
- Parameters:
entryBuffer
- contains the entry data and is positioned at the
data
- Returns:
- true if this entry should be returned
- Throws:
DatabaseException
calcFileSummaryMap
public static Map<Long,FileSummary> calcFileSummaryMap(EnvironmentImpl envImpl)
- Creates a UtilizationReader, reads the log, and returns the resulting
Map of Long file number to FileSummary.
Copyright (c) 2004-2012 Oracle. All rights reserved.