public class Logalyzer extends Object
This tool supports archiving and anaylzing (sort/grep) of log-files.
It takes as input
a) Input uri which will serve uris of the logs to be archived.
b) Output directory (not mandatory).
b) Directory on dfs to archive the logs.
c) The sort/grep patterns for analyzing the files and separator for boundaries.
Usage:
Logalyzer -archive -archiveDir
限定符和类型 | 类和说明 |
---|---|
static class |
Logalyzer.LogComparator
A WritableComparator optimized for UTF8 keys of the logs.
|
static class |
Logalyzer.LogRegexMapper<K extends WritableComparable>
A
Mapper that extracts text matching a regular expression. |
构造器和说明 |
---|
Logalyzer() |
限定符和类型 | 方法和说明 |
---|---|
void |
doAnalyze(String inputFilesDirectory,
String outputDirectory,
String grepPattern,
String sortColumns,
String columnSeparator)
doAnalyze:
|
void |
doArchive(String logListURI,
String archiveDirectory)
doArchive: Workhorse function to archive log-files.
|
static void |
main(String[] args) |
public void doArchive(String logListURI, String archiveDirectory) throws IOException
logListURI
- : The uri which will serve list of log-files to archive.archiveDirectory
- : The directory to store archived logfiles.IOException
public void doAnalyze(String inputFilesDirectory, String outputDirectory, String grepPattern, String sortColumns, String columnSeparator) throws IOException
inputFilesDirectory
- : Directory containing the files to be analyzed.outputDirectory
- : Directory to store analysis (output).grepPattern
- : Pattern to *grep* for.sortColumns
- : Sort specification for output.columnSeparator
- : Column separator.IOException
public static void main(String[] args)
Copyright © 2009 The Apache Software Foundation