-
Notifications
You must be signed in to change notification settings - Fork 857
SOLR-18300 : Update apache.kafka to V4 #4610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
10857dd
36c5040
1323530
ad85981
403de4a
037a2be
527f6ee
92ca690
14b4b95
4390690
f61915c
ffb603d
31729f8
0e131e2
2745322
5b3a1a4
12de0e5
8543224
a3b23ca
7d5bfed
90fc07e
48adad8
b5910aa
18f8a7b
55ea84f
918ca9a
54ac4c7
642a1c7
5eee83b
771469d
1badc8b
86b2b22
5248dca
a6847d6
d58f72f
31c0807
36bdb33
26c9ed5
f6cc688
6819af8
a2539cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| title: Update apache.kafka to v4 | ||
| type: dependency_update | ||
| authors: | ||
| - name: Jalaz Kumar | ||
| - name: Eric Pugh | ||
| links: | ||
| - name: SOLR-18300 | ||
| url: https://issues.apache.org/jira/browse/SOLR-18300 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ apache-curator = "5.9.0" | |
| apache-httpcomponents-httpclient = "4.5.14" | ||
| apache-httpcomponents-httpcore = "4.4.16" | ||
| apache-httpcomponents-httpmime = "4.5.14" | ||
| apache-kafka = "3.9.2" | ||
| apache-kafka = "4.3.1" | ||
| apache-log4j = "2.26.0" | ||
| apache-lucene = "10.4.0" | ||
| apache-opennlp = "2.5.10" | ||
|
|
@@ -257,8 +257,6 @@ apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpcli | |
| apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "apache-httpcomponents-httpcore" } | ||
| apache-httpcomponents-httpmime = { module = "org.apache.httpcomponents:httpmime", version.ref = "apache-httpcomponents-httpmime" } | ||
| apache-kafka-clients = { module = "org.apache.kafka:kafka-clients", version.ref = "apache-kafka" } | ||
| apache-kafka-kafka213 = { module = "org.apache.kafka:kafka_2.13", version.ref = "apache-kafka" } | ||
| apache-kafka-server-common = { module = "org.apache.kafka:kafka-server-common", version.ref = "apache-kafka" } | ||
| apache-kafka-streams = { module = "org.apache.kafka:kafka-streams", version.ref = "apache-kafka" } | ||
| apache-log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "apache-log4j" } | ||
| apache-log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "apache-log4j" } | ||
|
|
@@ -529,5 +527,6 @@ swagger3-annotations-jakarta = { module = "io.swagger.core.v3:swagger-annotation | |
| swagger3-jaxrs2-jakarta = { module = "io.swagger.core.v3:swagger-jaxrs2-jakarta", version.ref = "swagger3" } | ||
| tdunning-tdigest = { module = "com.tdunning:t-digest", version.ref = "tdunning-tdigest" } | ||
| testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" } | ||
| testcontainers-kafka = { module = "org.testcontainers:testcontainers-kafka", version.ref = "testcontainers" } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. We do this for Tika testing... |
||
| threeten-bp = { module = "org.threeten:threetenbp", version.ref = "threeten-bp" } | ||
| xerial-snappy-java = { module = "org.xerial.snappy:snappy-java", version.ref = "xerial-snappy" } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| import org.apache.tools.ant.taskdefs.condition.Os | ||
|
|
||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
|
|
@@ -40,8 +38,6 @@ dependencies { | |
| runtimeOnly libs.commonscodec.commonscodec | ||
|
|
||
| implementation libs.apache.kafka.clients | ||
| runtimeOnly libs.apache.kafka.kafka213 | ||
| runtimeOnly libs.apache.kafka.streams | ||
|
|
||
| runtimeOnly libs.apache.log4j.api | ||
| runtimeOnly libs.apache.log4j.core | ||
|
|
@@ -65,35 +61,17 @@ dependencies { | |
| testRuntimeOnly libs.bytebuddy | ||
| testRuntimeOnly libs.bytebuddy.agent | ||
|
|
||
| testImplementation(libs.apache.kafka.streams) { | ||
| artifact { | ||
| classifier = "test" | ||
| } | ||
| } | ||
| // EmbeddedKafkaCluster loads org.apache.kafka.test.TestCondition from this at runtime | ||
| testRuntimeOnly(libs.apache.kafka.clients) { | ||
| artifact { | ||
| classifier = "test" | ||
| } | ||
| } | ||
| testRuntimeOnly(libs.apache.kafka.kafka213) { | ||
| artifact { | ||
| classifier = "test" | ||
| } | ||
| } | ||
| testRuntimeOnly(libs.apache.kafka.server.common) { | ||
| artifact { | ||
| classifier = "test" | ||
| } | ||
| } | ||
| testImplementation libs.testcontainers.kafka | ||
| } | ||
|
|
||
| ext { | ||
| mainClass = 'org.apache.solr.crossdc.manager.consumer.Consumer' | ||
|
|
||
| // Use of the security manager is not supported on windows. | ||
| // Mockito does not work with it enabled. | ||
| useSecurityManager = !Os.isFamily(Os.FAMILY_WINDOWS) | ||
| // Docker/Testcontainers integration tests (KafkaContainerRule) do PATH scanning, | ||
| // spawn processes, and talk to the Docker daemon over a Unix socket -- none of | ||
| // which play well with a static SecurityManager policy. Same rationale as | ||
| // solr:modules:extraction, Solr's other Testcontainers consumer. | ||
| useSecurityManager = false | ||
|
Comment on lines
+70
to
+74
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is great! 💯 verified this working fine on local here: #4610 (comment) |
||
| } | ||
|
|
||
| task run(type: JavaExec) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,7 +88,8 @@ public static void printKafkaInfo(String host, String groupId) { | |
| for (TopicPartition topicPartition : topicPartitions) { | ||
| if (topicPartition.topic().equals(topic)) { | ||
| long endOffset = consumer.position(topicPartition); | ||
| long committedOffset = consumer.committed(topicPartition).offset(); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/apache/solr/actions/runs/28428066221/job/84235821648 , Simply updating the version was giving compilation error.
Evidences for supporting this change:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this is one of those deprecated apis that I saw now being fixed! |
||
| long committedOffset = | ||
| consumer.committed(Set.of(topicPartition)).get(topicPartition).offset(); | ||
| long updatesInQueue = endOffset - committedOffset; | ||
|
|
||
| log.info("Topic: {}", topic); | ||
|
|
||



There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.