executor.submit(new Runnable() {
@Override
public void run() {
if (threadLocalBulkIngesters.get() == null) {
BulkIngester bulkIngester = BulkIngester.newBulkIngester(lilyZk, 30000, repositoryName, tableName, bulkMode);
bulkIngesters.add(bulkIngester);
threadLocalBulkIngesters.set(bulkIngester);
}
BulkIngester bulkIngester = threadLocalBulkIngesters.get();
try {
bulkIngester.write(record);
recordsWritten.incrementAndGet();
} catch (Exception e) {
ExceptionUtil.handleInterrupt(e);
log.error("Error writing record " + record, e);
writeFailures.incrementAndGet();