Skip to content

Pulsar-client 2.5.0 throws UnsatisfiedLinkError when snappy is used for compression¥ #6260

@feeblefakie

Description

@feeblefakie

Describe the bug
UnsatisfiedLinkError is thrown when snappy compression is used.

The actual error:

java.lang.UnsatisfiedLinkError:
org.apache.pulsar.shade.org.xerial.snappy.SnappyNative.maxCompressedLength(I)I

The error won't happen if compression is not used or other compression like LZ4 is used.
Also, the error won't happen if pulsar-perf that comes with the binary is used with SNAPPY specified.

To Reproduce
Steps to reproduce the behavior:

  1. Create a producer with pulsar-client 2.5.0
Producer<byte[]> producer = client.newProducer().compressionType(CompressionType.SNAPPY).topic(topic).create();

Expected behavior
Just work with errors.

Screenshots
None.

Desktop (please complete the following information):

  • OS: Mac OSX

Additional context
My guess:
The binary has org.xerial.snappy-snappy-java-1.1.1.3.jar which has snappy .so files, but if I use pulsar-client those .so files are not installed, so it is producing such errors ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions