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
Modifier and Type | Class and Description |
---|---|
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. |
Modifier and Type | Field and Description |
---|---|
static String |
COLUMN_SEPARATOR |
static String |
SORT_COLUMNS |
Constructor and Description |
---|
Logalyzer() |
Modifier and Type | Method and Description |
---|---|
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 static final String SORT_COLUMNS
public static final String COLUMN_SEPARATOR
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 © 2013 Apache Software Foundation. All rights reserved.