This is an automated email from the ASF dual-hosted git repository. rayman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/samza.git
The following commit(s) were added to refs/heads/master by this push: new 6ff4863 Adding null-check before incrementing metrics for bytesSerialized (#1234) 6ff4863 is described below commit 6ff4863d5c002aa83b4c6b14910dbaa12b6f4d5e Author: rmatharu <40646191+rmath...@users.noreply.github.com> AuthorDate: Tue Dec 10 14:36:53 2019 -0800 Adding null-check before incrementing metrics for bytesSerialized (#1234) --- .../scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala b/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala index 51df502..d220fc7 100644 --- a/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala +++ b/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala @@ -136,7 +136,9 @@ class SerializedKeyValueStore[K, V]( null } else { val bytes = serde.toBytes(t) - metrics.bytesSerialized.inc(bytes.size) + if (bytes != null) { + metrics.bytesSerialized.inc(bytes.size) + } bytes }