beam
beam copied to clipboard
Stack trace decoration with Operator name for Samza Runner
- Added support for displaying the full tranform name with any stack-trace for Samza Runner
- Added support for decorating stack traces with additional debugging information by adding a SamzaExceptionListener via the observer pattern
Full transform name will be displayed with stack-trace on any exception thrown at runtime for ex
2022-08-02 11:45:30 ERROR [OpAdapter] [Samza StreamProcessor Container Thread-0] Op My Custom Operator/ParMultiDo(Anonymous) threw an exception during processing
java.lang.RuntimeException: org.apache.beam.sdk.util.UserCodeException: java.lang.RuntimeException: My Custom Exception
at org.apache.beam.runners.samza.metrics.DoFnRunnerWithMetrics.withMetrics(DoFnRunnerWithMetrics.java:96) ~[beam-runners-samza-200.30.0.5.jar:?]
at org.apache.beam.runners.samza.metrics.DoFnRunnerWithMetrics.processElement(DoFnRunnerWithMetrics.java:53) ~[beam-runners-samza-200.30.0.5.jar:?]
at org.apache.beam.runners.core.SimplePushbackSideInputDoFnRunner.processElementInReadyWindows(SimplePushbackSideInputDoFnRunner.java:79) ~[beam-runners-core-java-200.30.0.5.jar:?]
at org.apache.beam.runners.samza.runtime.DoFnOp.processElement(DoFnOp.java:295) ~[beam-runners-samza-200.30.0.5.jar:?]
at org.apache.beam.runners.samza.runtime.OpAdapter.apply(OpAdapter.java:94) ~[beam-runners-samza-200.30.0.5.jar:?]
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Choose reviewer(s) and mention them in a comment (
R: @username
). - [ ] Mention the appropriate issue in your description (for example:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead. - [ ] Update
CHANGES.md
with noteworthy changes. - [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.
See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.
R: @xinyuiscool @kw2542
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control
Run Samza ValidatesRunner
Run Java Samza PortableValidatesRunner
Run Python Samza ValidatesRunner
Run XVR_Samza PostCommit
Run Go Samza ValidatesRunner
Discussed offline and found out the actual use cases is for full TransformName. Suggest encoding that in the OpAdapter layer instead of pushing down to each Op and then only used by OpAdaptor.
Discussed offline and found out the actual use cases is for full TransformName. Suggest encoding that in the OpAdapter layer instead of pushing down to each Op and then only used by OpAdaptor.
ack, similplied the transform name via encoding it in OpAdapter
We found some unmerged changes from linkedin/beam to apache/beam, those changes needs to be first merged to open source to do this PR. For instance still in open source PortableTranslationContext & TranslationContext do not have a lineage
https://github.com/apache/beam/blob/0474afbe608cc6e43f8acc3464005e98c8ff4555/runners/samza/src/main/java/org/apache/beam/runners/samza/translation/PortableTranslationContext.java#L51
but for Linkedin fork does
https://github.com/linkedin/beam/blob/li_trunk/runners/samza/src/main/java/org/apache/beam/runners/samza/translation/PortableTranslationContext.java#L45