Skip to content
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

Dependencies should be verbosely enumerated or automated #4

Closed
slominskir opened this issue May 4, 2022 · 2 comments
Closed

Dependencies should be verbosely enumerated or automated #4

slominskir opened this issue May 4, 2022 · 2 comments

Comments

@slominskir
Copy link
Member

slominskir commented May 4, 2022

We need to either explicitly list the jar file dependencies needed by the transform or possibly bundle them up with the release. Currently installation requires downloading dependencies manually and copying them into the Kafka libs directory. This needs to either be documented or automated. The main dependencies are : avro and confluent avro (which depends on 6 other confluent jars and Google Guava). For example currently to install this transform I download confluent community edition and copy jars:

wget http://packages.confluent.io/archive/7.1/confluent-community-7.1.1.zip
unzip -d /opt/confluent confluent-community-7.1.1.zip
cd /opt/confluent
mv confluent-7.1.1 7.1.1
cp /opt/confluent/7.1.1/share/java/confluent-common/common-utils-7.1.1.jar /opt/kafka/libs/
cp /opt/confluent/7.1.1/share/java/confluent-common/common-config-7.1.1.jar /opt/kafka/libs/
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/kafka-avro-serializer-7.1.1.jar /opt/kafka/libs/
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/kafka-connect-avro-data-7.1.1.jar /opt/kafka/libs
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/kafka-connect-avro-converter-7.1.1.jar /opt/kafka/libs
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/kafka-schema-serializer-7.1.1.jar /opt/kafka/libs
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/kafka-schema-registry-client-7.1.1.jar /opt/kafka/libs
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/avro-1.11.0.jar /opt/kafka/libs
cp /opt/confluent/7.1.1/share/java/kafka-serde-tools/guava-30.1.1-jre.jar /opt/kafka/libs
@slominskir
Copy link
Member Author

README updated, plus java-library-distribution plugin now in use by Gradle build, which automatically accumulates dependencies.

@slominskir
Copy link
Member Author

slominskir commented May 17, 2022

Re-opening because this still isn't working as expected. First I was under the impression that dependencies could be included with the plugin, but this isn't reliable. It turns out that shared dependencies (dependencies used by Kafka itself, or other plugins) cause issues if found in the plugin directory as mentioned in the Debezium Dockerfile. In our case I've observed NoSuchClassExceptions for guava, even when the jar is inside the plugin subdirectory (and moving it to Kafka libs fixes the issue). We need to re-visit the README instructions to indicate the cleanest path is to do as mentioned initially and simply copy files from confluent community edition directly into Kafka libs dir. We may want to revisit the distribution plugin configuration to isolate the plugin jar and possibly any direct dependencies not found in Kafka libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant