MINOR: Remove duplicate properties encode in KafkaZkClient#setOrCreateEntityConfigs
The properties are encoded multiple times by `setOrCreateEntityConfigs`.
Reviewers: Ismael Juma
@@ -356,13 +356,13 @@ class KafkaZkClient private[zk] (zooKeeperClient: ZooKeeperClient, isSecure: Boo
def set(configData: Array[Byte]): SetDataResponse = {
val setDataRequest = SetDataRequest(ConfigEntityZNode.path(rootEntityType, sanitizedEntityName),
- ConfigEntityZNode.encode(config), ZkVersion.MatchAnyVersion)
+ configData, ZkVersion.MatchAnyVersion)
retryRequestUntilConnected(setDataRequest)
}
def createOrSet(configData: Array[Byte]): Unit = {
val path = ConfigEntityZNode.path(rootEntityType, sanitizedEntityName)
- try createRecursive(path, ConfigEntityZNode.encode(config))
+ try createRecursive(path, configData)
catch {
case _: NodeExistsException => set(configData).maybeThrow
}
