srdo commented on a change in pull request #2911: STORM-2720 : Add TIMESTAMP
option for FirstPollOffset for Kafka Trident spout
URL: https://github.com/apache/storm/pull/2911#discussion_r282127291
##########
File path:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/trident/KafkaTridentSpoutEmitter.java
##########
@@ -279,6 +293,18 @@ private long seek(TopicPartition tp,
KafkaTridentSpoutBatchMetadata lastBatchMet
return fetchOffset;
}
+ /**
+ * Seek the consumer to offset corresponding to startTimeStamp.
+ */
+ private void seekOffsetByStartTimeStamp(TopicPartition tp) {
+ long startTimeStampOffset;
+ Map<TopicPartition, OffsetAndTimestamp> map =
consumer.offsetsForTimes(Collections.singletonMap(tp, startTimeStamp));
Review comment:
Nit: Not a very useful variable name. How about `offsetsForTimes`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services