You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/04/24 19:54:28 UTC

[GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #650: Fix up offsets not available on leader exception

vinothchandar commented on a change in pull request #650: Fix up offsets not available on leader exception
URL: https://github.com/apache/incubator-hudi/pull/650#discussion_r278291492
 
 

 ##########
 File path: hoodie-utilities/src/main/java/com/uber/hoodie/utilities/sources/helpers/KafkaOffsetGen.java
 ##########
 @@ -204,8 +204,10 @@ public KafkaOffsetGen(TypedProperties props) {
 
     // Determine the offset ranges to read from
     HashMap<TopicAndPartition, KafkaCluster.LeaderOffset> fromOffsets;
+    HashMap<TopicAndPartition, KafkaCluster.LeaderOffset> checkpointOffsets;
     if (lastCheckpointStr.isPresent()) {
-      fromOffsets = CheckpointUtils.strToOffsets(lastCheckpointStr.get());
+      checkpointOffsets = CheckpointUtils.strToOffsets(lastCheckpointStr.get());
+      fromOffsets = checkupValidOffsets(cluster, checkpointOffsets, topicPartitions);
 
 Review comment:
   could we do this by upon exception alone? without incurring this overhead in every time? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services