wangxianghu commented on a change in pull request #2325:
URL: https://github.com/apache/hudi/pull/2325#discussion_r608268346
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieArchivedTimeline.java
##########
@@ -84,6 +88,14 @@ public HoodieArchivedTimeline(HoodieTableMetaClient
metaClient) {
this.details = (Function<HoodieInstant, Option<byte[]>> & Serializable)
this::getInstantDetails;
}
+ public HoodieArchivedTimeline(HoodieTableMetaClient metaClient,
Stream<HoodieInstant> instants) {
+ this.metaClient = metaClient;
+ setInstants(instants.collect(Collectors.toList()));
+ // multiple casts will make this lambda serializable -
+ // http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16
+ this.details = (Function<HoodieInstant, Option<byte[]>> & Serializable)
this::getInstantDetails;
+ }
+
Review comment:
@hddong This constructor is redundant.
--
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]