SequenceFilesFromMailArchives.class);
public void createSequenceFiles(MailOptions options) throws IOException {
ChunkedWriter writer = new ChunkedWriter(
getConf(), options.getChunkSize(), new Path(options.getOutputDir()));
MailProcessor processor = new MailProcessor(
options, options.getPrefix(), writer);
try {
if (options.getInput().isDirectory()) {
PrefixAdditionFilter filter = new PrefixAdditionFilter(
processor, writer);
options.getInput().listFiles(filter);
log.info("Parsed {} messages from {}", filter.getMessageCount(),
options.getInput().getAbsolutePath());
} else {
long start = System.currentTimeMillis();
long cnt = processor.parseMboxLineByLine(options.getInput());
long finish = System.currentTimeMillis();
log.info("Parsed {} messages from {} in time: {}", new Object[] {
cnt, options.getInput().getAbsolutePath(), finish - start});
}
} finally {