dnishimura 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_r323333005
##########
File path:
samza-core/src/main/scala/org/apache/samza/util/CoordinatorStreamUtil.scala
##########
@@ -131,8 +131,8 @@ object CoordinatorStreamUtil extends Logging {
} else {
val valueSerde: CoordinatorStreamValueSerde = new
CoordinatorStreamValueSerde(SetConfig.TYPE)
val valueAsString: String = valueSerde.fromBytes(valueAsBytes)
- if (StringUtils.isBlank(valueAsString)) {
- warn("Value for key: %s in config is empty or null. Ignoring it."
format key)
+ if (valueAsString == null) {
+ warn("Value for key: %s in config is decoded to be null. Ignoring
it." format key)
Review comment:
Might be useful to add a unit test to test that null values appear as
non-entries and empty string values are entries with an empty string when
loaded from the coordinator stream.
----------------------------------------------------------------
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