final MRBatchingPublisher client = MRClientFactory.createBatchingPublisher (topicProducerPropFileName);
out.add(client);
} catch (Exception e) {
- e.printStackTrace();
+ LOG.error(e.getMessage());
}
}
LOG.debug(String.format("Posting %s to %s", data, client));
client.send(partition, data);
} catch (IOException e) {
- e.printStackTrace();
+ LOG.error(e.getMessage());
success = false;
}
}
client.close(1, TimeUnit.SECONDS);
} catch (IOException | InterruptedException e) {
LOG.warn(String.format("Failed to cleanly close Dmaap connection for [%s]", client));
- e.printStackTrace();
}
}
}