Public Member Functions | |
LogFileSplitter (String inputFile, String outputFiles, Integer num, Integer mins, boolean csvFormat, String cols) | |
void | split () throws Exception |
Override void | xmlEntryReceived (String xmlLogString) |
Override void | bytesRead (long bytes) |
Override void | bytesWritten (long bytes) |
Override void | logsRead (int numOfLogs) |
Override void | logsWritten (int numOfLogs) |
Override void | errorReceived (String xml) |
Private Member Functions | |
BufferedWriter | getOutputFile (String dest, int idx, Date startingDate) |
void | closeOutputFile (BufferedWriter file) |
Private Attributes | |
String | inFileName |
String | destFileName |
int | index = 0 |
Integer | number = null |
Integer | time = null |
int | logsRead = 0 |
long | firstLogDate = -1 |
ACSLogParser | parser = null |
final int | OUTPUT_BUFFER_SIZE = 8192 |
BufferedWriter | outF = null |
SimpleDateFormat | dateFormat = new IsoDateFormat() |
boolean | writeAsCSV = false |
CSVConverter | csv |
String | cols = null |
A progressive number is appended to the name of the destination for each created file. If the time is the criteria to split the input file, the the date of the first log is appended to the name of the file too.
|
Constructor
|
|
|
|
|
|
Flush and close the file
|
|
|
|
Create a new file for output.
|
|
|
|
|
|
Split the input file
|
|
Exceuted when a new log has been read
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|