Giter VIP home page Giter VIP logo

Comments (6)

charithe avatar charithe commented on May 24, 2024

It sounds like the Avro serializer library has a transitive dependency on Curator. Try adding an exclusion rule to the dependency declaration.

from kafka-junit.

simplesteph avatar simplesteph commented on May 24, 2024

Do you have a working example? I'm not sure how to do that. I think that's something that should be documented on your front page as well because I'm sure other people will encounter that issue.

And I don't see Curator here unfortunately :(

mvn dependency:tree 
[INFO] +- io.confluent:kafka-avro-serializer:jar:3.3.0:compile
[INFO] |  +- org.apache.avro:avro:jar:1.8.2:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] |  |  +- com.thoughtworks.paranamer:paranamer:jar:2.7:compile
[INFO] |  |  +- org.xerial.snappy:snappy-java:jar:1.1.1.3:compile
[INFO] |  |  +- org.apache.commons:commons-compress:jar:1.8.1:compile
[INFO] |  |  \- org.tukaani:xz:jar:1.5:compile
[INFO] |  +- io.confluent:kafka-schema-registry-client:jar:3.3.0:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.4:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.8.4:compile
[INFO] |  |  \- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
[INFO] |  |     \- log4j:log4j:jar:1.2.17:compile
[INFO] |  +- io.confluent:common-config:jar:3.3.0:compile
[INFO] |  \- io.confluent:common-utils:jar:3.3.0:compile
[INFO] |     +- org.apache.zookeeper:zookeeper:jar:3.4.8:compile
[INFO] |     |  +- jline:jline:jar:0.9.94:compile
[INFO] |     |  \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] |     \- com.101tec:zkclient:jar:0.10:compile

from kafka-junit.

simplesteph avatar simplesteph commented on May 24, 2024

I think the issue is that you're targetting curator-test 4.0.0. This dependency is on Zookeeper 3.5.x, which is not the zookeeper supported by Kafka.

Maybe try downgrading to curator-test 2.12.0, which supports Zookeeper 3.4.x?

from kafka-junit.

charithe avatar charithe commented on May 24, 2024

Ah, it must be the transitive dependency on Zookeeper. Try excluding that from the Avro dependency.

<dependency>
    <groupId>io.confluent</groupId>
    <artifactId>kafka-avro-serializer</artifactId>
    <version>3.3.0</version>
    <exclusions>
         <exclusion>
             <groupId>org.apache</groupId>
             <artifactId>zookeeper</artifactId>
         </exclusion>
    </exclusions>
</dependency>

I'd rather not downgrade Curator now because it could cause a lot of existing code to break.

from kafka-junit.

simplesteph avatar simplesteph commented on May 24, 2024

According to https://mvnrepository.com/artifact/org.apache.curator/curator-test
2.12 and 3.3.0 were both released in March 2017.
2.12 targets zookeeper 3.4.x, the branch Kafka uses.
3.3.0 targets zookeeper 3.5.x, currently in beta and not working with Kafka

It seems curator-test was upgraded to 4.0.0 as part of this commit: 89bfeed Although I'm not sure if there's any reason why it has.

Bottom line, I believe downgrading to 2.12 is both safer and more sound based on matching the kafka zookeeper client version. It also prevents projects onboarding this library from having zookeeper clients in version beta 3.5.x, which could be a serious risk

In #30 Jenkins tested the project itself and it passes its own test suite, which is a pretty good indication the downgrade shouldn't break anything

I think it's still time to make a good decision for this project to follow the 2.x branch of curator-test. If you don't agree with me that's fine I won't insist :) Hope you understand my point of view

from kafka-junit.

charithe avatar charithe commented on May 24, 2024

It's been a while so I can't remember the reason for the upgrade. My fear is that the 3.x version has been out for a long time and by suddenly downgrading one of the dependencies, I could break existing code that may be accidentally (or, indeed, intentionally) relying on it. As this is a minor dependency conflict with a supporting Kafka library, I don't feel like a downgrade is justified here.

If you're uncomfortable with the dependency versions, feel free to keep your fork up. The code is Apache licensed and any future updates are most likely to be just Kafka version updates anyway.

from kafka-junit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.