Github user harshach commented on a diff in the pull request:
https://github.com/apache/storm/pull/1538#discussion_r69647624
--- Diff:
external/storm-kafka/src/jvm/storm/kafka/trident/TridentKafkaState.java ---
@@ -76,24 +77,36 @@ public void prepare(Map stormConf) {
producer = new Producer(config);
}
+ @SuppressWarnings({"rawtypes", "unchecked"})
public void updateState(List<TridentTuple> tuples, TridentCollector
collector) {
String topic = null;
+ List<KeyedMessage> batchList = new
ArrayList<KeyedMessage>(tuples.size());
+ // Creating Batch
for (TridentTuple tuple : tuples) {
try {
topic = topicSelector.getTopic(tuple);
-
- if(topic != null) {
- producer.send(new KeyedMessage(topic,
mapper.getKeyFromTuple(tuple),
+ if (topic != null) {
+ batchList.add(new KeyedMessage(topic,
mapper.getKeyFromTuple(tuple),
mapper.getMessageFromTuple(tuple)));
+ LOG.debug("Updated Batch");
--- End diff --
lets remove this log dont' see much use for it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---