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
[-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(Environment env,
int readBufferSize)
Creates a utility object for verifying log files.
|
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 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 static void main(String[] argv)
Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.