pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ambition119 commented on issue #3369: IndexOutOfBoundsException
Date Mon, 28 Jan 2019 01:44:40 GMT
ambition119 commented on issue #3369: IndexOutOfBoundsException
URL: https://github.com/apache/pulsar/issues/3369#issuecomment-457975401
 
 
   @jiazhai @sautran 
   org.apache.pulsar.client.kafka.compat.examples.ConsumerExample.java should use pulsar shaded
jar offered   [KafkaConsumer](https://github.com/apache/pulsar/blob/master/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml#L133)
class. If you use a runtime environment like IDEA,  you actually Kafka native jar offer class,
occurred this error.
   
   solution´╝Ü
   Modify KafkaConsumer to PulsarKafkaConsumer then run this example, no errors occurred.
   or Run the examples from command line, like:
   ```shell
   $ vi run.sh
   #!/usr/bin/env bash
   
   RELEASE_JAR=`ls ${PULSAR_CODE}/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/target/*.jar
2> /dev/null | grep -v tests | tail -1`
   if [ $? == 0 ]; then
       PULSAR_JAR=$RELEASE_JAR
   fi
   
   PULSAR_CLASSPATH="$RELEASE_JAR:${PULSAR_CODE}/distribution/server/target/apache-pulsar-2.3.0-SNAPSHOT/conf/log4j2.yaml:${PULSAR_CODE}/pulsar-client-kafka-compat/pulsar-client-kafka-tests/target/pulsar-client-kafka-tests-tests.jar:${PULSAR_CODE}/distribution/server/target/apache-pulsar-2.3.0-SNAPSHOT/lib/*"
   OPTS="-cp $PULSAR_CLASSPATH $OPTS"
   cd ${PULSAR_CODE}/pulsar-client-kafka-compat/pulsar-client-kafka-tests/target
   exec java $OPTS org.apache.pulsar.client.kafka.compat.examples.ProducerExample
   ```
   then run.sh no errors occurred.
   
   If there are no errors in the operation, this is not a bug.

----------------------------------------------------------------
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

Mime
View raw message