cameronlee314 commented on a change in pull request #1157: SAMZA-2325 : Adding
logic to read system config for repl-factor when creating a topic
URL: https://github.com/apache/samza/pull/1157#discussion_r325870600
##########
File path: samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
##########
@@ -285,7 +284,7 @@ class KafkaConfig(config: Config) extends
ScalaMapConfig(config) {
def getChangelogStreamMaxMessageByte(name: String) =
getOption(KafkaConfig.CHANGELOG_MAX_MESSAGE_BYTES format name) match {
case Some(maxMessageBytes) => maxMessageBytes
case _ =>
- val changelogSystem = StreamUtil.getSystemStreamFromNames(new
StorageConfig(config).getChangelogStream(name).get()).getSystem
+ val changelogSystem = StreamUtil.getSystemStreamFromNames(new
StorageConfig(config).getChangelogStream(name).orElse(null)).getSystem
Review comment:
It looks like this will throw an NPE if `getChangelogStream` returns empty.
----------------------------------------------------------------
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