codope commented on code in PR #12342:
URL: https://github.com/apache/hudi/pull/12342#discussion_r1865698437


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/Source.java:
##########
@@ -69,20 +80,63 @@ protected Source(TypedProperties props, JavaSparkContext 
sparkContext, SparkSess
     this.overriddenSchemaProvider = streamContext.getSchemaProvider();
     this.sourceType = sourceType;
     this.sourceProfileSupplier = streamContext.getSourceProfileSupplier();
+    this.writeTableVersion = ConfigUtils.getIntWithAltKeys(props, 
WRITE_TABLE_VERSION);
   }
 
+  @Deprecated
   @PublicAPIMethod(maturity = ApiMaturityLevel.STABLE)
   protected abstract InputBatch<T> fetchNewData(Option<String> lastCkptStr, 
long sourceLimit);
 
+  @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
+  protected InputBatch<T> fetchNewDataFromCheckpoint(Option<Checkpoint> 
lastCheckpoint, long sourceLimit) {
+    LOG.info("In Hudi 1.0+, the checkpoint based on Hudi timeline is changed. "
+        + "If your Source implementation relies on request time as the 
checkpoint, "
+        + "you may consider migrating to completion time-based checkpoint by 
overriding "
+        + "Source#translateCheckpoint and Source#fetchNewDataFromCheckpoint");
+    return fetchNewData(
+        lastCheckpoint.isPresent()
+            ? Option.of(lastCheckpoint.get().getCheckpointKey()) : 
Option.empty(),
+        sourceLimit);
+  }
+
+  @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
+  protected Option<Checkpoint> translateCheckpoint(Option<Checkpoint> 
lastCheckpoint) {

Review Comment:
   done



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to