Github user srdo commented on a diff in the pull request:
https://github.com/apache/storm/pull/2593#discussion_r178551488
--- Diff:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
---
@@ -570,20 +572,25 @@ public void ack(Object messageId) {
// Only need to keep track of acked tuples if commits to Kafka are
controlled by
// tuple acks, which happens only for at-least-once processing
semantics
final KafkaSpoutMessageId msgId = (KafkaSpoutMessageId) messageId;
- if (!emitted.contains(msgId)) {
- if (msgId.isEmitted()) {
+ if (!msgId.isNullTuple()) {
--- End diff --
Nit: You can reduce the nesting by a bit here by switching this to a guard
clause, e.g.
```
if (is null tuple) {
...
return
}
if (emitted contains) {
...
} else {
...
}
```
Up to you whether you want to change it
---