You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Patrik Márton (Jira)" <ji...@apache.org> on 2022/08/31 09:51:00 UTC

[jira] [Commented] (ATLAS-4620) Refactor EmbeddedKafkaServer in Atlas notification module to remove core kafka dependency

    [ https://issues.apache.org/jira/browse/ATLAS-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17598289#comment-17598289 ] 

Patrik Márton commented on ATLAS-4620:
--------------------------------------

The EmbeddedKafkaServer class uses the following classes from the core kafka library - *kafka_2.12-*.jar:*

kafka.server.KafkaConfig

kafka.server.KafkaServer

kafka.zookeeper.ZooKeeperClientException

 

The plan is to keep the EmbeddedKafkaServer.java in the current package, but replace the core kafka dependencies with the following: 

[https://github.com/mguenther/kafka-junit]

This way, the _KafkaServer_ will be replaced with _net.mguenther.kafka.junit.EmbeddedKafkaCluster_ , that can be set up the same way and with the same properties, and also uses an embedded zookeeper. 

 

 

> Refactor EmbeddedKafkaServer in Atlas notification module to remove core kafka dependency
> -----------------------------------------------------------------------------------------
>
>                 Key: ATLAS-4620
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4620
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>            Reporter: Patrik Márton
>            Assignee: Patrik Márton
>            Priority: Major
>
> Goal is to break the strong coupling between Atlas components and Kafka. These dependencies include using server side libraries of Kafka (this couples the Scala version and other non-public interfaces of Kafka). Any code using server side libraries of Kafka should be refactored.
> The notification module uses an EmbeddedKafkaServer which brings in the core kafka dependency. Based on the usage in the source, it is only used during testing, but pulled in as a compile dependency. 
> If there is a way to avoid using this embedded kafka server for other reasons (eg. development), this can be moved to the test folder and pulled in as a test scope dependency. 
> [https://github.com/apache/atlas/blob/master/notification/src/main/java/org/apache/atlas/kafka/EmbeddedKafkaServer.java]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)