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_r281492010
 
 

 ##########
 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:
   Actually at this point, I guess, just letting the exceptions go, without 
catching should be fine. Removing the catch statements

----------------------------------------------------------------
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

Reply via email to