janithkv 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_r281490741
##########
File path:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/trident/KafkaTridentSpoutEmitter.java
##########
@@ -279,6 +293,25 @@ private long seek(TopicPartition tp,
KafkaTridentSpoutBatchMetadata lastBatchMet
return fetchOffset;
}
+ /**
+ * Seek the consumer to offset corresponding to startTimeStamp.
+ */
+ private void seekOffsetByStartTimeStamp(TopicPartition tp) {
+ long startTimeStampOffset;
+ try {
+ startTimeStampOffset =
+ consumer.offsetsForTimes(Collections.singletonMap(tp,
startTimeStamp)).get(tp).offset();
+ } catch (IllegalArgumentException e) {
Review comment:
I was thinking , it would come up better in the UI, with
ReportedFailedExceptions. But I can take it off, if it does not add value.
----------------------------------------------------------------
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