xuang7 commented on code in PR #4349:
URL: https://github.com/apache/texera/pull/4349#discussion_r3053775762
##########
common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/LakeFSStorageClient.scala:
##########
@@ -300,8 +300,36 @@ object LakeFSStorageClient {
.sortBy(_.getCreationDate)(Ordering[java.lang.Long].reverse) // Sort in
descending order
}
+ /**
+ * Fetches all pages from a paginated LakeFS API call.
+ *
+ * @param fetch A function that takes a pagination cursor and returns
(results, pagination).
+ * @return All results across all pages.
+ */
+ private def fetchAllPages[T](
+ fetch: String => (java.util.List[T], Pagination)
+ ): List[T] = {
+ val allResults = scala.collection.mutable.ListBuffer[T]()
+ var hasMore = true
+ var after = ""
Review Comment:
Fixed, thanks!
--
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]