Repository: samza Updated Branches: refs/heads/master 8f7326be7 -> 13a38f28a
SAMZA-1733: Bugfix: Moving to use string for type info, to avoid ClassNotFound on deserial Exception type was serialized as a Class. However in case of Exceptions defined in non-samza-related or user-defined libs, the ExceptionEvent fails to be serialized. Author: rmath...@linkedin.com <rmath...@linkedin.com> Reviewers: Jagadish<jagad...@apache.org> Closes #609 from rmatharu/stringclasstype Project: http://git-wip-us.apache.org/repos/asf/samza/repo Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/13a38f28 Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/13a38f28 Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/13a38f28 Branch: refs/heads/master Commit: 13a38f28a05e00b7f79c2ad165e8a1e2f282208f Parents: 8f7326b Author: rmath...@linkedin.com <rmath...@linkedin.com> Authored: Wed Aug 15 17:41:25 2018 -0700 Committer: Jagadish <jvenkatra...@linkedin.com> Committed: Wed Aug 15 17:41:25 2018 -0700 ---------------------------------------------------------------------- .../apache/samza/diagnostics/DiagnosticsExceptionEvent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/samza/blob/13a38f28/samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsExceptionEvent.java ---------------------------------------------------------------------- diff --git a/samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsExceptionEvent.java b/samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsExceptionEvent.java index 753a4a5..5a6be1e 100644 --- a/samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsExceptionEvent.java +++ b/samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsExceptionEvent.java @@ -32,7 +32,7 @@ import org.apache.commons.lang3.exception.ExceptionUtils; public class DiagnosticsExceptionEvent { private long timestamp; // the timestamp associated with this exception - private Class exceptionType; // store the exception type separately + private String exceptionType; // store the exception type separately private String exceptionMessage; // the exception message private String compactExceptionStackTrace; // a compact representation of the exception's stacktrace private Map mdcMap; @@ -42,7 +42,7 @@ public class DiagnosticsExceptionEvent { } public DiagnosticsExceptionEvent(long timestampMillis, Throwable throwable, Map mdcMap) { - this.exceptionType = throwable.getClass(); + this.exceptionType = throwable.getClass().getName(); this.exceptionMessage = throwable.getMessage(); this.compactExceptionStackTrace = ExceptionUtils.getStackTrace(throwable); this.timestamp = timestampMillis; @@ -53,7 +53,7 @@ public class DiagnosticsExceptionEvent { return timestamp; } - public Class getExceptionType() { + public String getExceptionType() { return this.exceptionType; }