public class DbVerifyLog extends Object
This class may be instantiated and used programmatically, or used as a command line utility as described below.
usage: java { com.sleepycat.je.util.DbVerifyLog |
-jar je-<version>.jar DbVerifyLog }
[-h <dir>] # environment home directory
[-s <file>] # starting (minimum) file number
[-e <file>] # ending (one past the maximum) file number
[-d <millis>] # delay in ms between reads (default is zero)
[-V] # print JE version number"
All arguments are optional. The current directory is used if -h
is not specified. File numbers may be specified in hex (preceded by 0x) or decimal format. For convenience when copy/pasting from other
output, LSN format (<file>/<offset>) is also allowed.
| Constructor and Description |
|---|
DbVerifyLog(Environment env)
Creates a utility object for verifying the checksums in log files.
|
DbVerifyLog(EnvironmentImpl envImpl,
int readBufferSize) |
DbVerifyLog(Environment env,
int readBufferSize)
Creates a utility object for verifying log files.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNFilesDeleted()
Returns the number of files deleted so far.
|
int |
getNFilesToVerify()
Returns the number of files to be verified.
|
int |
getNFilesVerified()
Returns the number of files verified so far.
|
static void |
main(String[] argv) |
void |
setReadDelay(long delay,
TimeUnit unit)
Configures the delay between file reads during verification.
|
void |
setStopVerifyFlag(boolean val) |
void |
verify(long startFile,
long endFile)
Verifies the given range of log files in the environment.
|
void |
verifyAll()
Verifies all log files in the environment.
|
public DbVerifyLog(Environment env)
The read buffer size is EnvironmentConfig.LOG_ITERATOR_READ_SIZE.
env - the Environment associated with the log.EnvironmentFailureException - if an unexpected, internal or
environment-wide failure occurs.public DbVerifyLog(Environment env, int readBufferSize)
env - the Environment associated with the log.readBufferSize - is the buffer size to use. If a value less than
or equal to zero is specified, EnvironmentConfig.LOG_ITERATOR_READ_SIZE is used.EnvironmentFailureException - if an unexpected, internal or
environment-wide failure occurs.public DbVerifyLog(EnvironmentImpl envImpl, int readBufferSize)
public void verifyAll()
throws LogVerificationException,
IOException
LogVerificationException - if a checksum cannot be verified or a
log entry is determined to be invalid by examining its contents.IOException - if an IOException occurs while reading a log file.EnvironmentFailureException - if an unexpected, internal or
environment-wide failure occurs.public void verify(long startFile,
long endFile)
throws LogVerificationException,
IOException
startFile - is the lowest numbered log file to be verified.endFile - is one greater than the highest numbered log file to be
verified.LogVerificationException - if a checksum cannot be verified or a
log entry is determined to be invalid by examining its contents.IOException - if an IOException occurs while reading a log file.EnvironmentFailureException - if an unexpected, internal or
environment-wide failure occurs.public int getNFilesToVerify()
verifyAll() or verify(long, long).public int getNFilesVerified()
public int getNFilesDeleted()
public static void main(String[] argv)
public void setReadDelay(long delay,
TimeUnit unit)
By default there is no read delay (it is zero).
Note that when using the background data verifier, the delay between reads is
EnvironmentConfig.VERIFY_LOG_READ_DELAY.
delay - the delay between reads or zero for no delay.unit - the TimeUnit of the delay value. May be
null only if delay is zero.public void setStopVerifyFlag(boolean val)
Copyright © 2024. All rights reserved.