public class TruncateTranslogCommand extends EnvironmentAwareCommand
description, parser| Constructor and Description |
|---|
TruncateTranslogCommand() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
execute(Terminal terminal,
joptsimple.OptionSet options,
Environment env)
Execute the command with the initialized
Environment. |
static java.util.Set<java.nio.file.Path> |
filesInDirectory(java.nio.file.Path directory)
Return a Set of all files in a given directory
|
joptsimple.OptionParser |
getParser() |
protected void |
printAdditionalHelp(Terminal terminal) |
static void |
warnAboutDeletingFiles(Terminal terminal,
java.util.Set<java.nio.file.Path> files,
boolean batchMode)
Show a warning about deleting files, asking for a confirmation if
batchMode is false |
static void |
writeEmptyCheckpoint(java.nio.file.Path filename,
int translogLength,
long translogGeneration)
Write a checkpoint file to the given location with the given generation
|
static int |
writeEmptyTranslog(java.nio.file.Path filename,
java.lang.String translogUUID)
Write a translog containing the given translog UUID to the given location.
|
createEnv, executeaddShutdownHook, close, exit, mainpublic joptsimple.OptionParser getParser()
protected void printAdditionalHelp(Terminal terminal)
printAdditionalHelp in class Commandprotected void execute(Terminal terminal, joptsimple.OptionSet options, Environment env) throws java.lang.Exception
EnvironmentAwareCommandEnvironment.execute in class EnvironmentAwareCommandjava.lang.Exceptionpublic static void writeEmptyCheckpoint(java.nio.file.Path filename,
int translogLength,
long translogGeneration)
throws java.io.IOException
java.io.IOExceptionpublic static int writeEmptyTranslog(java.nio.file.Path filename,
java.lang.String translogUUID)
throws java.io.IOException
java.io.IOExceptionpublic static void warnAboutDeletingFiles(Terminal terminal, java.util.Set<java.nio.file.Path> files, boolean batchMode)
batchMode is falsepublic static java.util.Set<java.nio.file.Path> filesInDirectory(java.nio.file.Path directory)
throws java.io.IOException
java.io.IOException