String processorClass = conf.get(chunk.getDataType(),
defaultProcessor);
synchronized (this) {
MapProcessor processor = MapProcessorFactory.getProcessor(processorClass);
try {
Table table = null;
if(processor.getClass().isAnnotationPresent(Table.class)) {
table = processor.getClass().getAnnotation(Table.class);
} else if(processor.getClass().isAnnotationPresent(Tables.class)) {
Tables tables = processor.getClass().getAnnotation(Tables.class);
for(Table t : tables.annotations()) {
table = t;
}
}
if(table!=null) {
HTableInterface hbase = pool.getTable(table.name().getBytes());
processor.process(new ChukwaArchiveKey(), chunk, output, reporter);
hbase.put(output.getKeyValues());
pool.putTable(hbase);
}
} catch (Exception e) {