public class MVStoreTool extends Object
Constructor and Description |
---|
MVStoreTool() |
Modifier and Type | Method and Description |
---|---|
static void |
compact(MVStore source,
MVStore target)
Copy all live pages from the source store to the target store.
|
static void |
compact(String fileName,
boolean compress)
Compress the store by creating a new file and copying the live pages
there.
|
static void |
compact(String sourceFileName,
String targetFileName,
boolean compress)
Copy all live pages from the source store to the target store.
|
static void |
compactCleanUp(String fileName)
Clean up if needed, in a case a compact operation was interrupted due to
killing the process or a power failure.
|
static void |
dump(String fileName,
boolean details)
Read the contents of the file and write them to system out.
|
static void |
dump(String fileName,
Writer writer,
boolean details)
Read the contents of the file and display them in a human-readable
format.
|
static void |
info(String fileName)
Read the summary information of the file and write them to system out.
|
static String |
info(String fileName,
Writer writer)
Read the summary information of the file and write them to system out.
|
static void |
main(String... args)
Runs this tool.
|
static void |
repair(String fileName)
Repair a store by rolling back to the newest good version.
|
static long |
rollback(String fileName,
long targetVersion,
Writer writer)
Roll back to a given revision into a a file called *.temp.
|
public static void main(String... args)
[-dump <fileName>] | Dump the contends of the file |
[-info <fileName>] | Get summary information about a file |
[-compact <fileName>] | Compact a store |
[-compress <fileName>] | Compact a store with compression enabled |
args
- the command line argumentspublic static void dump(String fileName, boolean details)
fileName
- the name of the filedetails
- whether to print detailspublic static void info(String fileName)
fileName
- the name of the filepublic static void dump(String fileName, Writer writer, boolean details)
fileName
- the name of the filewriter
- the print writerdetails
- print the page detailspublic static String info(String fileName, Writer writer)
fileName
- the name of the filewriter
- the print writerpublic static void compact(String fileName, boolean compress)
fileName
- the file namecompress
- whether to compress the datapublic static void compactCleanUp(String fileName)
fileName
- the file namepublic static void compact(String sourceFileName, String targetFileName, boolean compress)
sourceFileName
- the name of the source storetargetFileName
- the name of the target storecompress
- whether to compress the datapublic static void compact(MVStore source, MVStore target)
source
- the source storetarget
- the target storepublic static void repair(String fileName)
fileName
- the file namepublic static long rollback(String fileName, long targetVersion, Writer writer)
fileName
- the file nametargetVersion
- the version to roll back to (Long.MAX_VALUE for the
latest version)writer
- the log writerCopyright © 2017 JBoss by Red Hat. All rights reserved.