kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject kafka git commit: MINOR - remove unused imports in package kafka.utils
Date Tue, 23 Feb 2016 02:14:28 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk d142f8294 -> 04585d99c


MINOR - remove unused imports in package kafka.utils

Author: zhuchen1018 <amandazhu19620701@gmail.com>

Reviewers: Grant Henke <granthenke@gmail.com>, Joel Koshy <jjkoshy.w@gmail.com>,
Dong Lin <lindong28@gmail.com>

Closes #935 from zhuchen1018/minor-remove-unused-imports


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/04585d99
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/04585d99
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/04585d99

Branch: refs/heads/trunk
Commit: 04585d99c6843a4253bae8ee958e360dd734d10e
Parents: d142f82
Author: zhuchen1018 <amandazhu19620701@gmail.com>
Authored: Mon Feb 22 18:14:18 2016 -0800
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Mon Feb 22 18:14:18 2016 -0800

----------------------------------------------------------------------
 .../src/main/scala/kafka/utils/CommandLineUtils.scala |  2 +-
 core/src/main/scala/kafka/utils/CoreUtils.scala       |  4 ----
 .../src/main/scala/kafka/utils/IteratorTemplate.scala |  2 --
 .../src/main/scala/kafka/utils/ReplicationUtils.scala |  1 -
 core/src/main/scala/kafka/utils/ZkUtils.scala         | 14 ++------------
 5 files changed, 3 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/04585d99/core/src/main/scala/kafka/utils/CommandLineUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/CommandLineUtils.scala b/core/src/main/scala/kafka/utils/CommandLineUtils.scala
index 87a5b00..ba5a789 100644
--- a/core/src/main/scala/kafka/utils/CommandLineUtils.scala
+++ b/core/src/main/scala/kafka/utils/CommandLineUtils.scala
@@ -18,7 +18,7 @@
 
 import joptsimple.{OptionSpec, OptionSet, OptionParser}
 import scala.collection.Set
- import java.util.Properties
+import java.util.Properties
 
  /**
  * Helper functions for dealing with command line utilities

http://git-wip-us.apache.org/repos/asf/kafka/blob/04585d99/core/src/main/scala/kafka/utils/CoreUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/CoreUtils.scala b/core/src/main/scala/kafka/utils/CoreUtils.scala
index ecd3572..b01f5cc 100755
--- a/core/src/main/scala/kafka/utils/CoreUtils.scala
+++ b/core/src/main/scala/kafka/utils/CoreUtils.scala
@@ -19,7 +19,6 @@ package kafka.utils
 
 import java.io._
 import java.nio._
-import charset.Charset
 import java.nio.channels._
 import java.util.concurrent.locks.{ReadWriteLock, Lock}
 import java.lang.management._
@@ -29,10 +28,7 @@ import org.apache.kafka.common.protocol.SecurityProtocol
 
 import scala.collection._
 import scala.collection.mutable
-import java.util.Properties
 import kafka.cluster.EndPoint
-import kafka.common.KafkaException
-import kafka.common.KafkaStorageException
 import org.apache.kafka.common.utils.Crc32
 import org.apache.kafka.common.utils.Utils
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/04585d99/core/src/main/scala/kafka/utils/IteratorTemplate.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/IteratorTemplate.scala b/core/src/main/scala/kafka/utils/IteratorTemplate.scala
index fd952f3..8c44955 100644
--- a/core/src/main/scala/kafka/utils/IteratorTemplate.scala
+++ b/core/src/main/scala/kafka/utils/IteratorTemplate.scala
@@ -17,8 +17,6 @@
 
 package kafka.utils
 
-import java.lang.IllegalStateException
-
 class State
 object DONE extends State
 object READY extends State

http://git-wip-us.apache.org/repos/asf/kafka/blob/04585d99/core/src/main/scala/kafka/utils/ReplicationUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/ReplicationUtils.scala b/core/src/main/scala/kafka/utils/ReplicationUtils.scala
index 4074c0f..31e8a92 100644
--- a/core/src/main/scala/kafka/utils/ReplicationUtils.scala
+++ b/core/src/main/scala/kafka/utils/ReplicationUtils.scala
@@ -21,7 +21,6 @@ import kafka.api.LeaderAndIsr
 import kafka.common.TopicAndPartition
 import kafka.controller.{IsrChangeNotificationListener, LeaderIsrAndControllerEpoch}
 import kafka.utils.ZkUtils._
-import org.I0Itec.zkclient.ZkClient
 import org.apache.zookeeper.data.Stat
 
 import scala.collection._

http://git-wip-us.apache.org/repos/asf/kafka/blob/04585d99/core/src/main/scala/kafka/utils/ZkUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/ZkUtils.scala b/core/src/main/scala/kafka/utils/ZkUtils.scala
index 7061333..ccc86df 100644
--- a/core/src/main/scala/kafka/utils/ZkUtils.scala
+++ b/core/src/main/scala/kafka/utils/ZkUtils.scala
@@ -17,12 +17,7 @@
 
 package kafka.utils
 
-import java.io.File
-import java.net.URI
-import java.security.URIParameter
-import javax.security.auth.login.Configuration
 import java.util.concurrent.CountDownLatch
-
 import kafka.cluster._
 import kafka.consumer.{ConsumerThreadId, TopicCount}
 import kafka.server.ConfigType
@@ -32,9 +27,7 @@ import org.I0Itec.zkclient.exception.{ZkException, ZkNodeExistsException,
ZkNoNo
 import org.I0Itec.zkclient.serialize.ZkSerializer
 import org.apache.kafka.common.config.ConfigException
 import org.apache.kafka.common.protocol.SecurityProtocol
-
 import org.apache.zookeeper.ZooDefs
-import scala.collection.JavaConverters._
 import scala.collection._
 import kafka.api.LeaderAndIsr
 import org.apache.zookeeper.data.{ACL, Stat}
@@ -45,12 +38,10 @@ import kafka.controller.KafkaController
 import kafka.controller.LeaderIsrAndControllerEpoch
 import kafka.common.TopicAndPartition
 import kafka.utils.ZkUtils._
-
 import org.apache.zookeeper.AsyncCallback.{DataCallback,StringCallback}
 import org.apache.zookeeper.CreateMode
 import org.apache.zookeeper.KeeperException
 import org.apache.zookeeper.KeeperException.Code
-import org.apache.zookeeper.ZooDefs.Ids
 import org.apache.zookeeper.ZooKeeper
 
 object ZkUtils {
@@ -267,10 +258,10 @@ class ZkUtils(val zkClient: ZkClient,
   /**
    * Register brokers with v2 json format (which includes multiple endpoints).
    * This format also includes default endpoints for compatibility with older clients.
-   * @param zkClient
    * @param id
+   * @param host
+   * @param port
    * @param advertisedEndpoints
-   * @param timeout
    * @param jmxPort
    */
   def registerBrokerInZk(id: Int, host: String, port: Int, advertisedEndpoints: immutable.Map[SecurityProtocol,
EndPoint], jmxPort: Int) {
@@ -755,7 +746,6 @@ class ZkUtils(val zkClient: ZkClient,
    * This API takes in a broker id, queries zookeeper for the broker metadata and returns
the metadata for that broker
    * or throws an exception if the broker dies before the query to zookeeper finishes
    * @param brokerId The broker id
-   * @param zkClient The zookeeper client connection
    * @return An optional Broker object encapsulating the broker metadata
    */
   def getBrokerInfo(brokerId: Int): Option[Broker] = {


Mime
View raw message