Berkeley DB Java Edition
version 4.0.92

com.sleepycat.je.util
Class DbTruncateLog

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

public class DbTruncateLog
extends Object

DbTruncateLog is a utility that allows the user to truncate the JE log at a specified file and offset. Generally used in replication systems for handling com.sleepycat.je.rep.RollbackProhibitedException. Must be used with caution. See RollbackProhibitedException for the appropriate truncation parameters.


Constructor Summary
DbTruncateLog()
           
 
Method Summary
static void main(String[] argv)
          Usage:
 void truncateLog(File envHome, long truncateFileNum, long truncateOffset)
          Truncate the JE log to the given file and offset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbTruncateLog

public DbTruncateLog()
Method Detail

main

public static void main(String[] argv)
Usage:
  -h environmentDirectory
  -f file number. If hex, prefix with "0x"
  -o file offset byte. If hex, prefix with "0x"
 
For example, to truncate a log to file 0xa, offset 0x1223:
 DbTruncateLog -h <environmentDir> -f 0xa -o 0x1223
 


truncateLog

public void truncateLog(File envHome,
                        long truncateFileNum,
                        long truncateOffset)
                 throws IOException
Truncate the JE log to the given file and offset.

Throws:
IOException

Berkeley DB Java Edition
version 4.0.92

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