hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] garyli1019 commented on a change in pull request #1377: [HUDI-663] Fix HoodieDeltaStreamer offset not handled correctly
Date Thu, 12 Mar 2020 00:35:25 GMT
garyli1019 commented on a change in pull request #1377: [HUDI-663] Fix HoodieDeltaStreamer
offset not handled correctly
URL: https://github.com/apache/incubator-hudi/pull/1377#discussion_r391344867
 
 

 ##########
 File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java
 ##########
 @@ -180,7 +180,7 @@ public KafkaOffsetGen(TypedProperties props) {
               .map(x -> new TopicPartition(x.topic(), x.partition())).collect(Collectors.toSet());
 
       // Determine the offset ranges to read from
-      if (lastCheckpointStr.isPresent()) {
+      if (lastCheckpointStr.isPresent() && !lastCheckpointStr.get().isEmpty()) {
 
 Review comment:
   I agree with @bvaradar here. 
   I tried 
   ```java
   else if (commitMetadata.getMetadata(CHECKPOINT_KEY) != null && !commitMetadata.getMetadata(CHECKPOINT_KEY).isEmpty())
{
             resumeCheckpointStr = Option.of(commitMetadata.getMetadata(CHECKPOINT_KEY));
           }
   ```
   The unit tests were passed.
   If you mean when the checkpoint was empty, the application was throwing an Exception. I
think it should the desired behavior, WDYT?

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

Mime
View raw message