use of org.apache.metron.dataloads.nonbulk.flatfile.importer.Summarizers in project metron by apache.
the class SimpleFlatFileSummarizer method main.
public static void main(Configuration hadoopConfig, String[] argv) throws Exception {
CommandLine cli = SummarizeOptions.parse(new PosixParser(), argv);
EnumMap<SummarizeOptions, Optional<Object>> config = SummarizeOptions.createConfig(cli);
if (SummarizeOptions.LOG4J_PROPERTIES.has(cli)) {
PropertyConfigurator.configure(SummarizeOptions.LOG4J_PROPERTIES.get(cli));
}
ExtractorHandler handler = ExtractorHandler.load(FileUtils.readFileToString(new File(SummarizeOptions.EXTRACTOR_CONFIG.get(cli).trim())));
Summarizers strategy = (Summarizers) config.get(SummarizeOptions.IMPORT_MODE).get();
strategy.getSummarizer().importData(config, handler, hadoopConfig);
}
Aggregations