shanthoosh 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_r279089426
##########
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:
Done.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services