Skip to content

Fix lz4 library incompatibility in kafka-indexing-service extension #3266

@sascha-coenen

Description

@sascha-coenen

The druid-kafka-indexing-service extension contains the following two libraries:

  • kafka-clients 0.9.0.1
  • lz4 1.3.0

The kafka-clients lib itself has a dependency on the lz4 lib version 1.2.0.
This doesn't lead to a version conflict as long as the Kafka topic consumed from contains message-batches that are either uncompressed or use a different compression scheme.

If the kafka topic contains messages that have been lz4 compressed by the kafka-producer, then the kafka-indexing-service fails with the following exception which is due to the version conflict:

java.lang.NoSuchMethodError: net.jpountz.util.Utils.checkRange([BII)V
    at org.apache.kafka.common.record.KafkaLZ4BlockInputStream.read(KafkaLZ4BlockInputStream.java:177) 

Possible options for a bugfix might be

  • in the kafka-indexing-service extension POM, downgrade lz4 library version
  • in the kafka-indexing-service extension POM, upgrade kafka-clients library to 0.10.0.0 which is built against lz4 version 1.3.0
    I haven't checked if the kafka-client v 0.10 would be backwards compatible with with kafka server 0.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions