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 2017/04/27 23:08:23 UTC
kafka git commit: KAFKA-5101;
Remove unused zkClient parameter in incrementControllerEpoch
Repository: kafka
Updated Branches:
refs/heads/trunk 909cf9bb9 -> efa479736
KAFKA-5101; Remove unused zkClient parameter in incrementControllerEpoch
Author: Balint Molnar <ba...@gmail.com>
Reviewers: Ismael Juma <is...@juma.me.uk>
Closes #2886 from baluchicken/KAFKA-5101
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/efa47973
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/efa47973
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/efa47973
Branch: refs/heads/trunk
Commit: efa479736c041f7c311fbb26664d91a739ac4040
Parents: 909cf9b
Author: Balint Molnar <ba...@gmail.com>
Authored: Fri Apr 28 00:06:35 2017 +0100
Committer: Ismael Juma <is...@juma.me.uk>
Committed: Fri Apr 28 00:06:42 2017 +0100
----------------------------------------------------------------------
core/src/main/scala/kafka/controller/KafkaController.scala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/efa47973/core/src/main/scala/kafka/controller/KafkaController.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/controller/KafkaController.scala b/core/src/main/scala/kafka/controller/KafkaController.scala
index b7c2ae4..e7e190f 100644
--- a/core/src/main/scala/kafka/controller/KafkaController.scala
+++ b/core/src/main/scala/kafka/controller/KafkaController.scala
@@ -30,7 +30,7 @@ import kafka.server._
import kafka.utils.ZkUtils._
import kafka.utils._
import org.I0Itec.zkclient.exception.{ZkNoNodeException, ZkNodeExistsException}
-import org.I0Itec.zkclient.{IZkChildListener, IZkDataListener, IZkStateListener, ZkClient}
+import org.I0Itec.zkclient.{IZkChildListener, IZkDataListener, IZkStateListener}
import org.apache.kafka.common.errors.{BrokerNotAvailableException, ControllerMovedException}
import org.apache.kafka.common.metrics.Metrics
import org.apache.kafka.common.protocol.{ApiKeys, Errors}
@@ -236,7 +236,7 @@ class KafkaController(val config: KafkaConfig, zkUtils: ZkUtils, val brokerState
def onControllerFailover() {
info("Broker %d starting become controller state transition".format(config.brokerId))
readControllerEpochFromZookeeper()
- incrementControllerEpoch(zkUtils.zkClient)
+ incrementControllerEpoch()
// before reading source of truth from zookeeper, register the listeners to get broker/topic callbacks
registerPartitionReassignmentListener()
@@ -608,7 +608,7 @@ class KafkaController(val config: KafkaConfig, zkUtils: ZkUtils, val brokerState
controllerContext.controllerChannelManager.sendRequest(brokerId, apiKey, request, callback)
}
- def incrementControllerEpoch(zkClient: ZkClient) = {
+ def incrementControllerEpoch() = {
try {
var newControllerEpoch = controllerContext.epoch + 1
val (updateSucceeded, newVersion) = zkUtils.conditionalUpdatePersistentPathIfExists(