ATLAS-5336: Upgrade Kafka to 3.9.1; embedded notification broker uses KRaft (no ZooKeeper)#689
Open
ramackri wants to merge 1 commit into
Open
ATLAS-5336: Upgrade Kafka to 3.9.1; embedded notification broker uses KRaft (no ZooKeeper)#689ramackri wants to merge 1 commit into
ramackri wants to merge 1 commit into
Conversation
… KRaft Bump kafka-clients and embedded test broker from 2.8.2 to 3.9.1 (Scala 2.13), replace ZooKeeper-based EmbeddedKafkaServer with KafkaClusterTestKit, and update docker dev Kafka image packaging to kafka_2.13-3.9.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KafkaClusterTestKit.kafka_2.13-3.9.1.Motivation
Changes
kafka.versionkafka.scala.binary.versionEmbeddedKafkaServerKafkaServerKafkaClusterTestKit(KRaft)atlas-kafkaimagekafka_2.12-*kafka_2.13-3.9.1bootstrap.serversset at runtimewebapp/pom.xmljackson-jaxrs+jsr311-apifor REST after Jackson bumpwebapp/pom.xml— why these dependencies were addedThis PR bumps root
jackson.versionfrom 2.12.7 → 2.16.2 (required by Kafka 3.9KafkaClusterTestKittest dependencies). That version flows intoatlas-intg, which declares:jackson-jaxrs-baseat${jackson.version}jackson-jaxrs-json-providerat${jackson.version}Atlas server REST still runs on Jersey 1.19 (JAX-RS 1.1 / JSR-311). After the Jackson bump, the rebuilt server WAR pulled in Jackson JAX-RS 2.16 transitively while Jersey and its JSON providers expect the older 2.12-era JAX-RS integration. In manual Docker testing this produced an inconsistent classpath — Atlas failed to serve REST reliably (
GET /api/atlas/admin/versiondid not return 200) even though the Kafka/embedded-broker changes were correct.Fix in
webapp/pom.xml:jackson-jaxrs-basejackson-jaxrs-json-providerJacksonJaxbJsonProviderused by Jersey for JSON request/response serialization on Atlas REST APIsjsr311-apijavax.ws.rs.*) required by Jersey 1.x JSON providersatlas-intgexclusions on the twojackson-jaxrs-*artifacts prevent the WAR from also loading the 2.16.2 transitive copies. Webapp now owns a single, known-good JAX-RS Jackson version for the server while the rest of the build can use Jackson 2.16.2 where Kafka requires it.This is intentionally not a Jersey upgrade — it decouples server-side JAX-RS Jackson (2.12.7) from the core Jackson bump (2.16.2) needed for Kafka 3.9.1.
Testing
Unit tests
KafkaNotificationTestnotificationmvn -pl notification -Dtest=KafkaNotificationTest testATLAS_HOOKNotificationHookConsumerKafkaTestwebappmvn -pl webapp -am -Dtest=NotificationHookConsumerKafkaTest -DskipEnunciate=true testNotificationHookConsumerKafkaTestwas run with-amsoatlas-server-apiand sibling modules match compile-time APIs.Manual — embedded KRaft broker smoke test
Unit tests exercise
EmbeddedKafkaServerinside a short-lived Surefire JVM. A separate manual check verified the same path in the full Atlas server process (complete WAR classpath, normal Spring startup order, real graph store and Solr).Setup: Atlas server running in Docker with Postgres and Solr. External Kafka broker was not required — embedded mode runs the broker in-process.
Steps:
atlas.notification.embedded=trueinatlas-application.properties(placeholderatlas.kafka.bootstrap.servers=localhost:9027).GET /api/atlas/admin/versionuntil HTTP 200.EmbeddedKafkaServer.start(isEmbedded=true)Starting embedded KRaft kafka (log.dir=.../data/kafka/kafka)Embedded KRaft kafka server started at localhost:<ephemeral-port>atlas.kafka.bootstrap.serverswas rewritten at runtime to the live broker address (placeholder not used as-is).atlas.notification.embedded=falseand external bootstrap servers; restart Atlas.Result: PASS — KRaft broker started inside the real server JVM; Atlas REST returned 200; graph, Solr, Jersey, and notification stack all initialized.
Manual — external Kafka 3.9.1 (production-like path)
Verified Atlas with
atlas.notification.embedded=falseagainst an external Kafka 3.9.1 broker (kafka_2.13-3.9.1), using the rebuilt Atlas server image.CREATE TABLEvia Hive; Atlas REST search forhive_columnon new tableATLAS_HOOKATLAS_ENTITIESconsumption; tag mapping visible in Ranger AdminSELECTon classified column as allowed/denied usersOverall: PASS — full metadata path (Hive → external Kafka → Atlas →
ATLAS_ENTITIES→ TagSync → Ranger) and audit paths worked with Kafka 3.9.1.Notes
atlas.notification.embedded=falseand externalbootstrap.servers.https://issues.apache.org/jira/browse/ATLAS-5336