jubins commented on code in PR #28226:
URL: https://github.com/apache/flink/pull/28226#discussion_r3293889822
##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/ApplicationExceptionsInfoWithHistory.java:
##########
@@ -91,10 +91,11 @@ public String toString() {
}
public static ApplicationExceptionsInfoWithHistory
fromApplicationExceptionHistory(
- Collection<ApplicationExceptionHistoryEntry> exceptions) {
+ Collection<ApplicationExceptionHistoryEntry> exceptions, int
maxSize) {
return new ApplicationExceptionsInfoWithHistory(
new ApplicationExceptionHistory(
exceptions.stream()
+ .limit(maxSize)
Review Comment:
No. `Stream.limit(n)` preserves encounter order and just truncates to the
first `n` elements, same iteration order as before, only shorter
--
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]