dengpanyin commented on a change in pull request #1150: SAMZA-2318: Empty
config values from coordinator stream shouldn't be removed
URL: https://github.com/apache/samza/pull/1150#discussion_r324296314
##########
File path:
samza-core/src/test/scala/org/apache/samza/util/TestCoordinatorStreamUtil.scala
##########
@@ -34,4 +39,31 @@ class TestCoordinatorStreamUtil {
Mockito.verify(systemStream).getStream
Mockito.verify(systemAdmin).createStream(any(classOf[StreamSpec]))
}
+
+ @Test
+ def testReadConfigFromCoordinatorStream {
+ val keyForNonBlankVal = "app.id"
+ val nonBlankVal = "1"
+ val keyForEmptyVal = "task.opt"
+ val emptyVal = ""
+ val keyForNullVal = "zk.server"
+ val nullVal = null
Review comment:
Good catch. valueSerde.toBytes(nullVal) is able to correctly encode the null
value. This function "readConfigFromCoordinatorStream" is using
valueSerde.fromBytes(valueAsBytes) for deserialization, so we need to pass null
value to the config map (other than a string of "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:
[email protected]
With regards,
Apache Git Services