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

Fix kafka plugin dependencies. #4169

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions data-prepper-plugins/kafka-plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,16 @@ dependencies {
implementation 'io.micrometer:micrometer-core'
implementation libs.commons.lang3
implementation 'io.confluent:kafka-avro-serializer:7.4.0'
implementation 'io.confluent:kafka-json-schema-serializer:7.4.0'
implementation 'io.confluent:kafka-schema-registry-client:7.4.0'
implementation ('io.confluent:kafka-schema-registry:7.4.0:tests') {
exclude group: 'org.glassfish.jersey.containers', module: 'jersey-container-servlet'
exclude group: 'org.glassfish.jersey.inject', module: 'jersey-hk2'
exclude group: 'org.glassfish.jersey.ext', module: 'jersey-bean-validation'
}
implementation 'software.amazon.awssdk:sts'
implementation 'software.amazon.awssdk:auth'
implementation 'software.amazon.awssdk:kafka'
implementation 'software.amazon.awssdk:kms'
implementation 'software.amazon.msk:aws-msk-iam-auth:2.0.3'
implementation 'software.amazon.glue:schema-registry-serde:1.1.15'
implementation 'io.confluent:kafka-json-schema-serializer:7.4.0'
implementation project(':data-prepper-plugins:failures-common')
implementation 'com.github.fge:json-schema-validator:2.2.14'
implementation 'com.github.java-json-tools:json-schema-validator:2.2.14'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one in Maven Central?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

implementation 'commons-collections:commons-collections:3.2.2'
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:apache-client'
Expand All @@ -65,7 +60,6 @@ dependencies {
testImplementation 'org.apache.kafka:kafka_2.13:3.6.1'
testImplementation 'org.apache.kafka:kafka_2.13:3.6.1:test'
testImplementation 'org.apache.curator:curator-test:5.5.0'
testImplementation 'io.confluent:kafka-schema-registry:7.4.0'
testImplementation('com.kjetland:mbknor-jackson-jsonschema_2.13:1.0.39')
testImplementation group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.9'
testImplementation project(':data-prepper-plugins:otel-metrics-source')
Expand All @@ -74,8 +68,15 @@ dependencies {
testImplementation libs.protobuf.util
testImplementation libs.commons.io
testImplementation libs.armeria.grpc
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'

integrationTestImplementation testLibs.junit.vintage
integrationTestImplementation 'io.confluent:kafka-schema-registry:7.4.0'
integrationTestImplementation ('io.confluent:kafka-schema-registry:7.4.0:tests') {
exclude group: 'org.glassfish.jersey.containers', module: 'jersey-container-servlet'
exclude group: 'org.glassfish.jersey.inject', module: 'jersey-hk2'
exclude group: 'org.glassfish.jersey.ext', module: 'jersey-bean-validation'
}

constraints {
implementation('org.mozilla:rhino') {
Expand Down Expand Up @@ -130,4 +131,3 @@ task integrationTest(type: Test) {
includeTestsMatching '*IT'
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.confluent.kafka.serializers.KafkaAvroDeserializer;
import io.confluent.kafka.serializers.KafkaAvroDeserializerConfig;
import io.confluent.kafka.serializers.KafkaJsonDeserializer;
import kafka.common.BrokerEndPointNotAvailableException;
import org.apache.commons.lang3.StringUtils;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.KafkaConsumer;
Expand Down Expand Up @@ -108,8 +107,7 @@ public List<KafkaCustomConsumer> createConsumersForTopic(final KafkaConsumerConf

});
} catch (Exception e) {
if (e instanceof BrokerNotAvailableException ||
e instanceof BrokerEndPointNotAvailableException || e instanceof TimeoutException) {
if (e instanceof BrokerNotAvailableException || e instanceof TimeoutException) {
LOG.error("The Kafka broker is not available.");
} else {
LOG.error("Failed to setup the Kafka Source Plugin.", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
import io.confluent.kafka.serializers.KafkaAvroDeserializer;
import io.confluent.kafka.serializers.json.KafkaJsonSchemaDeserializer;
import kafka.common.BrokerEndPointNotAvailableException;
import org.apache.avro.generic.GenericRecord;
import org.apache.commons.lang3.StringUtils;
import org.apache.kafka.clients.consumer.ConsumerConfig;
Expand Down Expand Up @@ -146,8 +145,7 @@ public void start(Buffer<Record<Event>> buffer) {
executorService.submit(consumer);
});
} catch (Exception e) {
if (e instanceof BrokerNotAvailableException ||
e instanceof BrokerEndPointNotAvailableException || e instanceof TimeoutException) {
if (e instanceof BrokerNotAvailableException || e instanceof TimeoutException) {
LOG.error("The kafka broker is not available...");
} else {
LOG.error("Failed to setup the Kafka Source Plugin.", e);
Expand Down
Loading