rmetzger commented on a change in pull request #14678:
URL: https://github.com/apache/flink/pull/14678#discussion_r559979096
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/ExecutionFailureHandler.java
##########
@@ -98,11 +103,26 @@ public FailureHandlingResult
getGlobalFailureHandlingResult(final Throwable caus
true);
}
+ /** @param failureListener the failure listener to be registered */
+ public void registerFailureListener(FailureListener failureListener) {
+ failureListeners.add(failureListener);
+ }
+
private FailureHandlingResult handleFailure(
final Throwable cause,
final Set<ExecutionVertexID> verticesToRestart,
final boolean globalFailure) {
+ try {
+ for (FailureListener listener : failureListeners) {
+ listener.onFailure(cause, globalFailure);
+ }
+ } catch (Throwable e) {
+ return FailureHandlingResult.unrecoverable(
+ new JobException("The failure in failure listener is not
recoverable", e),
Review comment:
```suggestion
new JobException("Unexpected exception in
FailureListener", e),
```
----------------------------------------------------------------
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]