kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Remove unneeded client used API lists
Date Fri, 13 Jan 2017 19:06:18 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 7a61ce4cf -> 6496271a1


MINOR: Remove unneeded client used API lists

Author: Jason Gustafson <jason@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>, Gwen Shapira <cshapi@gmail.com>,
Apurva Mehta <apurva.1618@gmail.com>, Ismael Juma <ismael@juma.me.uk>

Closes #2372 from hachikuji/minor-cleanup-used-apis


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

Branch: refs/heads/trunk
Commit: 6496271a11003195d703292a68c6a6c04e56d79d
Parents: 7a61ce4
Author: Jason Gustafson <jason@confluent.io>
Authored: Fri Jan 13 19:04:57 2017 +0000
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Fri Jan 13 19:04:57 2017 +0000

----------------------------------------------------------------------
 .../apache/kafka/clients/consumer/KafkaConsumer.java | 15 +--------------
 .../apache/kafka/clients/producer/KafkaProducer.java |  8 --------
 .../runtime/distributed/WorkerGroupMember.java       | 11 +----------
 3 files changed, 2 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/6496271a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
index bbad999..e0fbb74 100644
--- a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
@@ -24,7 +24,6 @@ import org.apache.kafka.clients.consumer.internals.NoOpConsumerRebalanceListener
 import org.apache.kafka.clients.consumer.internals.PartitionAssignor;
 import org.apache.kafka.clients.consumer.internals.SubscriptionState;
 import org.apache.kafka.common.Cluster;
-import org.apache.kafka.common.internals.ClusterResourceListeners;
 import org.apache.kafka.common.KafkaException;
 import org.apache.kafka.common.Metric;
 import org.apache.kafka.common.MetricName;
@@ -32,6 +31,7 @@ import org.apache.kafka.common.PartitionInfo;
 import org.apache.kafka.common.TopicPartition;
 import org.apache.kafka.common.config.ConfigException;
 import org.apache.kafka.common.errors.InterruptException;
+import org.apache.kafka.common.internals.ClusterResourceListeners;
 import org.apache.kafka.common.metrics.JmxReporter;
 import org.apache.kafka.common.metrics.MetricConfig;
 import org.apache.kafka.common.metrics.Metrics;
@@ -39,7 +39,6 @@ import org.apache.kafka.common.metrics.MetricsReporter;
 import org.apache.kafka.common.network.ChannelBuilder;
 import org.apache.kafka.common.network.Selector;
 import org.apache.kafka.common.requests.MetadataRequest;
-import org.apache.kafka.common.protocol.ApiKeys;
 import org.apache.kafka.common.serialization.Deserializer;
 import org.apache.kafka.common.utils.AppInfoParser;
 import org.apache.kafka.common.utils.Time;
@@ -48,7 +47,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.net.InetSocketAddress;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.ConcurrentModificationException;
@@ -507,17 +505,6 @@ public class KafkaConsumer<K, V> implements Consumer<K, V>
{
     private static final long NO_CURRENT_THREAD = -1L;
     private static final AtomicInteger CONSUMER_CLIENT_ID_SEQUENCE = new AtomicInteger(1);
     private static final String JMX_PREFIX = "kafka.consumer";
-    private static final List<ApiKeys> CONSUMER_APIS = Arrays.asList(
-            ApiKeys.METADATA,
-            ApiKeys.FETCH,
-            ApiKeys.GROUP_COORDINATOR,
-            ApiKeys.HEARTBEAT,
-            ApiKeys.JOIN_GROUP,
-            ApiKeys.LEAVE_GROUP,
-            ApiKeys.LIST_OFFSETS,
-            ApiKeys.OFFSET_COMMIT,
-            ApiKeys.OFFSET_FETCH,
-            ApiKeys.SYNC_GROUP);
     static final long DEFAULT_CLOSE_TIMEOUT_MS = 30 * 1000;
 
     private final String clientId;

http://git-wip-us.apache.org/repos/asf/kafka/blob/6496271a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
index 38f87f6..c604daa 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
@@ -39,7 +39,6 @@ import org.apache.kafka.common.metrics.MetricsReporter;
 import org.apache.kafka.common.metrics.Sensor;
 import org.apache.kafka.common.network.ChannelBuilder;
 import org.apache.kafka.common.network.Selector;
-import org.apache.kafka.common.protocol.ApiKeys;
 import org.apache.kafka.common.record.CompressionType;
 import org.apache.kafka.common.record.Record;
 import org.apache.kafka.common.record.Records;
@@ -51,7 +50,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.net.InetSocketAddress;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -132,12 +130,6 @@ public class KafkaProducer<K, V> implements Producer<K, V>
{
     private static final Logger log = LoggerFactory.getLogger(KafkaProducer.class);
     private static final AtomicInteger PRODUCER_CLIENT_ID_SEQUENCE = new AtomicInteger(1);
     private static final String JMX_PREFIX = "kafka.producer";
-    /**
-     * APIs used by KafkaProducer
-     */
-    private static final List<ApiKeys> PRODUCER_APIS = Arrays.asList(
-            ApiKeys.METADATA,
-            ApiKeys.PRODUCE);
 
     private String clientId;
     private final Partitioner partitioner;

http://git-wip-us.apache.org/repos/asf/kafka/blob/6496271a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerGroupMember.java
----------------------------------------------------------------------
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerGroupMember.java
b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerGroupMember.java
index 5ee3362..ac13472 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerGroupMember.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerGroupMember.java
@@ -30,16 +30,14 @@ import org.apache.kafka.common.metrics.Metrics;
 import org.apache.kafka.common.metrics.MetricsReporter;
 import org.apache.kafka.common.network.ChannelBuilder;
 import org.apache.kafka.common.network.Selector;
-import org.apache.kafka.common.protocol.ApiKeys;
 import org.apache.kafka.common.utils.AppInfoParser;
 import org.apache.kafka.common.utils.Time;
-import org.apache.kafka.connect.util.ConnectorTaskId;
 import org.apache.kafka.connect.storage.ConfigBackingStore;
+import org.apache.kafka.connect.util.ConnectorTaskId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.net.InetSocketAddress;
-import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -58,13 +56,6 @@ public class WorkerGroupMember {
 
     private static final AtomicInteger CONNECT_CLIENT_ID_SEQUENCE = new AtomicInteger(1);
     private static final String JMX_PREFIX = "kafka.connect";
-    private static final List<ApiKeys> WORKER_GROUP_MEMBER_APIS = Arrays.asList(
-            ApiKeys.METADATA,
-            ApiKeys.GROUP_COORDINATOR,
-            ApiKeys.HEARTBEAT,
-            ApiKeys.JOIN_GROUP,
-            ApiKeys.LEAVE_GROUP,
-            ApiKeys.SYNC_GROUP);
 
     private final Time time;
     private final String clientId;


Mime
View raw message