You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2020/05/30 15:59:03 UTC
[kafka] branch trunk updated: MINOR: Remove duplicate properties
encode in KafkaZkClient#setOrCreateEntityConfigs (#8636)
This is an automated email from the ASF dual-hosted git repository.
ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 40b0033 MINOR: Remove duplicate properties encode in KafkaZkClient#setOrCreateEntityConfigs (#8636)
40b0033 is described below
commit 40b0033eedf823d3bd3c6781cfd871a949c5827e
Author: Chia-Ping Tsai <ch...@gmail.com>
AuthorDate: Sat May 30 23:58:34 2020 +0800
MINOR: Remove duplicate properties encode in KafkaZkClient#setOrCreateEntityConfigs (#8636)
The properties are encoded multiple times by `setOrCreateEntityConfigs`.
Reviewers: Ismael Juma <is...@juma.me.uk>
---
core/src/main/scala/kafka/zk/KafkaZkClient.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/src/main/scala/kafka/zk/KafkaZkClient.scala b/core/src/main/scala/kafka/zk/KafkaZkClient.scala
index 7f6f025..cb6fd02 100644
--- a/core/src/main/scala/kafka/zk/KafkaZkClient.scala
+++ b/core/src/main/scala/kafka/zk/KafkaZkClient.scala
@@ -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
}