public class DbTruncateLog extends Object
The parameters for DbTruncateLog are provided through the RollbackProhibitedException instance, and the exception message. The goal is to truncate the JE log after a specified file number and file offset. DbTruncateLog will automatically delete all log entries after that specified log entry.
For example, suppose the JE log consists of these files:
00000002.jdb
0000000e.jdb
0000000f.jdb
00000010.jdb
00000012.jdb
0000001d.jdb
0000001e.jdb
0000001f.jdb
And the log must be truncated at file 0x1d, offset 0x34567, users should use
the following command:
| Constructor and Description |
|---|
DbTruncateLog() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] argv)
Usage:
|
void |
truncateLog(File env,
long truncFileNum,
long truncOffset) |
public static void main(String[] argv)
-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
public void truncateLog(File env, long truncFileNum, long truncOffset) throws IOException
IOExceptionCopyright © 2024. All rights reserved.