public class CollectLogCommand extends AbstractCollectInfoCommand
Modifier and Type | Field and Description |
---|---|
static String |
ADDITIONAL_OPTION_NAME |
static String |
COMMAND_NAME |
static String |
EXCLUDE_OPTION_NAME |
static Set<String> |
FILE_NAMES_PREFIXES |
static String |
INCLUDE_OPTION_NAME |
static org.apache.commons.cli.Options |
OPTIONS |
mFsContext, mWorkingDirPath
Constructor and Description |
---|
CollectLogCommand(FileSystemContext fsContext)
Creates a new instance of
CollectLogCommand . |
Modifier and Type | Method and Description |
---|---|
String |
getCommandName()
Gets the command name as input from the shell.
|
String |
getDescription() |
String |
getUsage() |
static java.time.LocalDateTime |
inferFileStartTime(File f)
Infer the starting time of a log file by parsing the log entries from the beginning.
|
static java.time.LocalDateTime |
parseDateTime(String s)
Identifies the datetime from a certain piece of log by trying various known patterns.
|
int |
run(org.apache.commons.cli.CommandLine cl)
Runs the command.
|
generateOutputFile, getWorkingDirectory, validateArgs
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getOptions, getSubCommands, hasSubCommand, parseAndValidateArgs
public static final String COMMAND_NAME
public static final String INCLUDE_OPTION_NAME
public static final String EXCLUDE_OPTION_NAME
public static final String ADDITIONAL_OPTION_NAME
public static final org.apache.commons.cli.Options OPTIONS
public CollectLogCommand(FileSystemContext fsContext)
CollectLogCommand
.fsContext
- the FileSystemContext
to execute inpublic String getCommandName()
Command
public int run(org.apache.commons.cli.CommandLine cl) throws AlluxioException, IOException
Command
cl
- the parsed command line for the argumentsAlluxioException
IOException
public static java.time.LocalDateTime inferFileStartTime(File f) throws FileNotFoundException
f
- log fileFileNotFoundException
public String getUsage()
public String getDescription()
Copyright © 2023. All Rights Reserved.