Skip to content

Commit abec62a

Browse files
lindong28smccauliff
authored andcommitted
Upgrade to kafka 2.0.0 (linkedin#132)
1 parent 973bbb4 commit abec62a

File tree

4 files changed

+3
-62
lines changed

4 files changed

+3
-62
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ allprojects {
1717
compile 'net.sourceforge.argparse4j:argparse4j:0.5.0'
1818
compile 'org.slf4j:slf4j-log4j12:1.7.6'
1919
compile 'org.apache.avro:avro:1.4.0'
20-
compile 'org.apache.kafka:kafka_2.12:1.1.1'
21-
compile 'org.apache.kafka:kafka-clients:1.1.1'
20+
compile 'org.apache.kafka:kafka_2.12:2.0.0'
21+
compile 'org.apache.kafka:kafka-clients:2.0.0'
2222
compile 'org.testng:testng:6.8.8'
2323
compile 'org.eclipse.jetty:jetty-server:8.1.19.v20160209'
2424
compile 'org.json:json:20140107'

src/main/java/com/linkedin/kmf/consumer/OldConsumer.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/main/java/com/linkedin/kmf/services/ConsumeService.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.linkedin.kmf.consumer.BaseConsumerRecord;
1515
import com.linkedin.kmf.consumer.KMBaseConsumer;
1616
import com.linkedin.kmf.consumer.NewConsumer;
17-
import com.linkedin.kmf.consumer.OldConsumer;
1817
import com.linkedin.kmf.services.configs.ConsumeServiceConfig;
1918
import java.util.ArrayList;
2019
import java.util.HashMap;
@@ -93,11 +92,6 @@ public ConsumeService(Map<String, Object> props, String name) throws Exception {
9392

9493
if (consumerClassName.equals(NewConsumer.class.getCanonicalName()) || consumerClassName.equals(NewConsumer.class.getSimpleName())) {
9594
consumerClassName = NewConsumer.class.getCanonicalName();
96-
} else if (consumerClassName.equals(OldConsumer.class.getCanonicalName()) || consumerClassName.equals(OldConsumer.class.getSimpleName())) {
97-
consumerClassName = OldConsumer.class.getCanonicalName();
98-
// The name/value of these configs are changed in the new consumer.
99-
consumerProps.put("auto.commit.enable", "false");
100-
consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "largest");
10195
}
10296

10397
// Assign config specified for ConsumeService.

src/main/java/com/linkedin/kmf/services/configs/ConsumeServiceConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ConsumeServiceConfig extends AbstractConfig {
2929

3030
public static final String CONSUMER_CLASS_CONFIG = "consume.consumer.class";
3131
public static final String CONSUMER_CLASS_DOC = "Consumer class that will be instantiated as consumer in the consume service. "
32-
+ "It can be NewConsumer, OldConsumer, or full class name of any class that implements the KMBaseConsumer interface.";
32+
+ "It can be NewConsumer or full class name of any class that implements the KMBaseConsumer interface.";
3333

3434
public static final String LATENCY_PERCENTILE_MAX_MS_CONFIG = "consume.latency.percentile.max.ms";
3535
public static final String LATENCY_PERCENTILE_MAX_MS_DOC = "This is used to derive the bucket number used to configure latency percentile metric. "

0 commit comments

Comments
 (0)