You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/04/26 17:14:02 UTC
[GitHub] [samza] rmatharu commented on a change in pull request #1010:
SAMZA-2176: Ignore the keys with serialized null values from the
coordinator stream.
rmatharu commented on a change in pull request #1010: SAMZA-2176: Ignore the keys with serialized null values from the coordinator stream.
URL: https://github.com/apache/samza/pull/1010#discussion_r279033339
##########
File path: samza-core/src/main/scala/org/apache/samza/util/CoordinatorStreamUtil.scala
##########
@@ -106,9 +107,17 @@ object CoordinatorStreamUtil {
val configFromCoordinatorStream: util.Map[String, Array[Byte]] = namespaceAwareCoordinatorStreamStore.all
val configMap: util.Map[String, String] = new util.HashMap[String, String]
for ((key: String, valueAsBytes: Array[Byte]) <- configFromCoordinatorStream.asScala) {
- val valueSerde: CoordinatorStreamValueSerde = new CoordinatorStreamValueSerde(SetConfig.TYPE)
- val valueAsString: String = valueSerde.fromBytes(valueAsBytes)
- configMap.put(key, valueAsString)
+ if (valueAsBytes == null) {
+ info("Value for key: %s is null. Ignoring it." format key)
Review comment:
Could this be logged as a warning, because a value for a config-key ideally should not be null.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services