Zakelly commented on code in PR #25987:
URL: https://github.com/apache/flink/pull/25987#discussion_r1916248470
##########
flink-core/src/main/java/org/apache/flink/core/state/StateFutureUtils.java:
##########
@@ -105,4 +107,27 @@ public static <T> StateFuture<Collection<T>> combineAll(
return ret;
}
}
+
+ /**
+ * Convert a future of state iterator to a future of iterable. There is no
good reason to do so,
+ * since this may disable the capability of lazy loading. Only useful when
the further
+ * calculation depends on the whole data from the iterator.
+ */
+ public static <T> StateFuture<Iterable<T>>
toIterable(StateFuture<StateIterator<T>> future) {
+ return future.thenCompose(
+ iterator -> {
Review Comment:
Added.
--
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]