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 2018/05/25 23:28:08 UTC
[kafka] branch 1.1 updated: KAFKA-6930: Convert byte array to
string in KafkaZkClient debug log (#5061)
This is an automated email from the ASF dual-hosted git repository.
ijuma pushed a commit to branch 1.1
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/1.1 by this push:
new acbaf45 KAFKA-6930: Convert byte array to string in KafkaZkClient debug log (#5061)
acbaf45 is described below
commit acbaf459e7998dd8ee85e08486c248157af7a484
Author: yaphet <da...@gmail.com>
AuthorDate: Sat May 26 07:26:44 2018 +0800
KAFKA-6930: Convert byte array to string in KafkaZkClient debug log (#5061)
Reviewers: Ismael Juma <is...@juma.me.uk>
---
core/src/main/scala/kafka/zk/KafkaZkClient.scala | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/src/main/scala/kafka/zk/KafkaZkClient.scala b/core/src/main/scala/kafka/zk/KafkaZkClient.scala
index 8faf60a..a7037c7 100644
--- a/core/src/main/scala/kafka/zk/KafkaZkClient.scala
+++ b/core/src/main/scala/kafka/zk/KafkaZkClient.scala
@@ -32,7 +32,7 @@ import kafka.utils.Logging
import kafka.zookeeper._
import org.apache.kafka.common.TopicPartition
import org.apache.kafka.common.security.token.delegation.{DelegationToken, TokenInformation}
-import org.apache.kafka.common.utils.Time
+import org.apache.kafka.common.utils.{Time, Utils}
import org.apache.zookeeper.KeeperException.{Code, NodeExistsException}
import org.apache.zookeeper.data.{ACL, Stat}
import org.apache.zookeeper.{CreateMode, KeeperException, ZooKeeper}
@@ -597,7 +597,7 @@ class KafkaZkClient private (zooKeeperClient: ZooKeeperClient, isSecure: Boolean
setDataResponse.resultCode match {
case Code.OK =>
debug("Conditional update of path %s with value %s and expected version %d succeeded, returning the new version: %d"
- .format(path, data, expectVersion, setDataResponse.stat.getVersion))
+ .format(path, Utils.utf8(data), expectVersion, setDataResponse.stat.getVersion))
(true, setDataResponse.stat.getVersion)
case Code.BADVERSION =>
@@ -606,18 +606,18 @@ class KafkaZkClient private (zooKeeperClient: ZooKeeperClient, isSecure: Boolean
case _ =>
debug("Checker method is not passed skipping zkData match")
debug("Conditional update of path %s with data %s and expected version %d failed due to %s"
- .format(path, data, expectVersion, setDataResponse.resultException.get.getMessage))
+ .format(path, Utils.utf8(data), expectVersion, setDataResponse.resultException.get.getMessage))
(false, ZkVersion.NoVersion)
}
case Code.NONODE =>
- debug("Conditional update of path %s with data %s and expected version %d failed due to %s".format(path, data,
- expectVersion, setDataResponse.resultException.get.getMessage))
+ debug("Conditional update of path %s with data %s and expected version %d failed due to %s".format(path,
+ Utils.utf8(data), expectVersion, setDataResponse.resultException.get.getMessage))
(false, ZkVersion.NoVersion)
case _ =>
- debug("Conditional update of path %s with data %s and expected version %d failed due to %s".format(path, data,
- expectVersion, setDataResponse.resultException.get.getMessage))
+ debug("Conditional update of path %s with data %s and expected version %d failed due to %s".format(path,
+ Utils.utf8(data), expectVersion, setDataResponse.resultException.get.getMessage))
throw setDataResponse.resultException.get
}
}
--
To stop receiving notification emails like this one, please contact
ijuma@apache.org.