danny0405 commented on code in PR #12869:
URL: https://github.com/apache/hudi/pull/12869#discussion_r1968781639


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v2/ArchivedTimelineV2.java:
##########
@@ -86,13 +89,84 @@ public ArchivedTimelineV2(HoodieTableMetaClient metaClient) 
{
    * Loads completed instants from startTs(inclusive).
    * Note that there is no lazy loading, so this may not work if really early 
startTs is specified.
    */
-  public ArchivedTimelineV2(HoodieTableMetaClient metaClient, String startTs) {
+  /*public ArchivedTimelineV2(HoodieTableMetaClient metaClient, String 
startTs) {
     this.metaClient = metaClient;
     setInstants(loadInstants(new 
HoodieArchivedTimeline.StartTsFilter(startTs), 
HoodieArchivedTimeline.LoadMode.METADATA));
     this.cursorInstant = startTs;
     // multiple casts will make this lambda serializable -
     // http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16
     this.instantReader = this;
+  }*/
+
+  private ArchivedTimelineV2(HoodieTableMetaClient metaClient, TimeRangeFilter 
timeRangeFilter) {
+    this(metaClient, timeRangeFilter, null, 
Option.of(HoodieInstant.State.COMPLETED));
+  }
+
+  /**
+   * Loads instants satisfying the given time range filter and state. If state 
is Option.EMPTY, instants of all states are loaded
+   */
+  private ArchivedTimelineV2(HoodieTableMetaClient metaClient, TimeRangeFilter 
timeRangeFilter, Option<HoodieInstant.State> state) {
+    this(metaClient, timeRangeFilter, null, state);

Review Comment:
   The change does not make sense for V2 archive timeline, because it does not 
have log files and the state is always `COMPLETED`.



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