Berkeley DB Java Edition
version 5.0.34

com.sleepycat.je.util
Class DbVerifyLog

java.lang.Object
  extended by com.sleepycat.je.util.DbVerifyLog

public class DbVerifyLog
extends Object

Verifies the checksums in one or more log files.

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 Summary
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.
 
Method Summary
static void main(String[] argv)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbVerifyLog

public DbVerifyLog(Environment env)
Creates a utility object for verifying the checksums in log files.

The read buffer size is EnvironmentConfig.LOG_ITERATOR_READ_SIZE.

Parameters:
env - the Environment associated with the log.
Throws:
EnvironmentFailureException - if an unexpected, internal or environment-wide failure occurs.

DbVerifyLog

public DbVerifyLog(Environment env,
                   int readBufferSize)
Creates a utility object for verifying log files.

Parameters:
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.
Throws:
EnvironmentFailureException - if an unexpected, internal or environment-wide failure occurs.
Method Detail

verifyAll

public void verifyAll()
               throws LogVerificationException,
                      IOException
Verifies all log files in the environment.

Throws:
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.

verify

public void verify(long startFile,
                   long endFile)
            throws LogVerificationException,
                   IOException
Verifies the given range of log files in the environment.

Parameters:
startFile - is the lowest numbered log file to be verified.
endFile - is one greater than the highest numbered log file to be verified.
Throws:
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.

main

public static void main(String[] argv)

Berkeley DB Java Edition
version 5.0.34

Copyright (c) 2004-2011 Oracle. All rights reserved.