You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/09/21 17:24:12 UTC

[GitHub] [beam] xinyuiscool commented on a diff in pull request #23221: Stack Trace Decoration for Beam Samza Runner

xinyuiscool commented on code in PR #23221:
URL: https://github.com/apache/beam/pull/23221#discussion_r976798445


##########
runners/samza/src/main/java/org/apache/beam/runners/samza/runtime/OpAdapter.java:
##########
@@ -102,7 +115,16 @@ public synchronized CompletionStage<Collection<OpMessage<OutT>>> apply(OpMessage
               String.format("Unexpected input type: %s", message.getType()));
       }
     } catch (Exception e) {
-      LOG.error("Op {} threw an exception during processing", this.getClass().getName(), e);
+      LOG.error("Op {} threw an exception during processing", transformFullName, e);
+      e.addSuppressed(
+          new RuntimeException(
+              String.format("Op: %s threw an exception during processing", transformFullName)));
+      exceptionListeners.forEach(

Review Comment:
   Please add another try-catch {ignore} here for exceptionListeners.forEach. I don't want this block to be interrupted by the listeners.
   
   You might consider move this logic line 119 - 127 in a private function, e.g. notifyExceptionListners(...)



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org