bytesandwich commented on a change in pull request #15898:
URL: https://github.com/apache/flink/pull/15898#discussion_r657359944
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveScheduler.java
##########
@@ -880,6 +891,19 @@ public void goToFinished(ArchivedExecutionGraph
archivedExecutionGraph) {
transitionToState(new Finished.Factory(this, archivedExecutionGraph,
LOG));
}
+ @Override
+ public void archiveFailure(FailureHandlingResultSnapshot
failureHandlingResultSnapshot) {
+ exceptionHistory.add(
+ RootExceptionHistoryEntry.fromFailureHandlingResultSnapshot(
+ failureHandlingResultSnapshot));
+ }
+
+ private Iterable<RootExceptionHistoryEntry> getExceptionHistory() {
+ final Collection<RootExceptionHistoryEntry> copy = new
ArrayList<>(exceptionHistory.size());
+ exceptionHistory.forEach(copy::add);
+ return copy;
Review comment:
Does making {BoundedFIFOQueue} an
[AbstractQueue](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractQueue.html)
and replacing this with {new ArrayList{<the queue>)} work?
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveScheduler.java
##########
@@ -880,6 +891,19 @@ public void goToFinished(ArchivedExecutionGraph
archivedExecutionGraph) {
transitionToState(new Finished.Factory(this, archivedExecutionGraph,
LOG));
}
+ @Override
+ public void archiveFailure(FailureHandlingResultSnapshot
failureHandlingResultSnapshot) {
+ exceptionHistory.add(
+ RootExceptionHistoryEntry.fromFailureHandlingResultSnapshot(
+ failureHandlingResultSnapshot));
+ }
+
+ private Iterable<RootExceptionHistoryEntry> getExceptionHistory() {
+ final Collection<RootExceptionHistoryEntry> copy = new
ArrayList<>(exceptionHistory.size());
+ exceptionHistory.forEach(copy::add);
+ return copy;
Review comment:
Does making `BoundedFIFOQueue` an
[AbstractQueue](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractQueue.html)
and replacing this with `new ArrayList{<the queue>)` work?
--
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]