You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/01/22 16:45:30 UTC
[GitHub] sijie commented on a change in pull request #3401: [Issue #3369]
fix kafka ProducerExample and ConsumerExample IndexOutOfBoundsException
sijie commented on a change in pull request #3401: [Issue #3369] fix kafka ProducerExample and ConsumerExample IndexOutOfBoundsException
URL: https://github.com/apache/pulsar/pull/3401#discussion_r249865707
##########
File path: pulsar-client-kafka-compat/pulsar-client-kafka-tests/src/test/java/org/apache/pulsar/client/kafka/compat/examples/ConsumerExample.java
##########
@@ -23,7 +23,7 @@
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerRecords;
-import org.apache.kafka.clients.consumer.KafkaConsumer;
+import org.apache.kafka.clients.consumer.PulsarKafkaConsumer;
Review comment:
I don't think this is the right fix. the examples are used to test the shaded pulsar kafka client wrapper. `PulsarKafkaConsumer` should already be shaded and relocated to `KafkaConsumer`. If this example doesn't work, it means the shading doesn't work properly or it has original kafka dependencies in the classpath.
If you are running on intellij, it might be a problem of intellij which doesn't handle shaded dependencies very well. so what I would suggest is to run the examples from command line to see if that's a problem or not.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services