SAMZA-638: Add Stream Name to SystemConsumersException Message
Project: http://git-wip-us.apache.org/repos/asf/samza/repo Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/457a5245 Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/457a5245 Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/457a5245 Branch: refs/heads/samza-sql Commit: 457a5245100749113b57585e559469530d25caa9 Parents: 76e151c Author: Navina Ramesh <[email protected]> Authored: Mon Apr 6 16:17:40 2015 -0700 Committer: Jakob Homan <[email protected]> Committed: Mon Apr 6 16:17:40 2015 -0700 ---------------------------------------------------------------------- .../main/scala/org/apache/samza/system/SystemConsumers.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/samza/blob/457a5245/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala ---------------------------------------------------------------------- diff --git a/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala b/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala index 125d376..76fa4ad 100644 --- a/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala +++ b/samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala @@ -290,9 +290,12 @@ class SystemConsumers( Some(serdeManager.fromBytes(rawEnvelope)) } catch { case e: Exception if !dropDeserializationError => - throw new SystemConsumersException("Cannot deserialize an incoming message.", e) + throw new SystemConsumersException( + "Cannot deserialize an incoming message for %s" + .format(systemStreamPartition.getSystemStream.toString), e) case ex: Exception => - debug("Cannot deserialize an incoming message. Dropping the error message.", ex) + debug("Cannot deserialize an incoming message for %s. Dropping the error message." + .format(systemStreamPartition.getSystemStream.toString), ex) metrics.deserializationError.inc None }
