gyfora commented on code in PR #808:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/808#discussion_r1542520539


##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/event/AutoScalerEventHandler.java:
##########
@@ -63,6 +65,19 @@ void handleEvent(
             @Nullable String messageKey,
             @Nullable Duration interval);
 
+    /**
+     * Handle exception, and the exception event is warning type and don't 
deduplicate by default.
+     */
+    default void handleException(Context context, String reason, Throwable e) {
+        var message = e.getMessage();
+        if (message == null) {
+            var stream = new ByteArrayOutputStream();
+            e.printStackTrace(new PrintStream(stream));
+            message = stream.toString();

Review Comment:
   we should also set some reasonable (relatively small) limit on the string 
size here otherwise we might get an error when inserting the Kube event / db 
column



-- 
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]

Reply via email to