You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Enrico Olivelli <eo...@gmail.com> on 2021/07/09 13:36:23 UTC

Problems with Native AVRO inside Pulsar IO

Hello folks,
I have fallen into this bad problem with the classpath of Sinks (and
Functions in general).

the short version of the story is that I cannot find a way to manipulate an
org.apache.avro...GenericRecord returned by
org.apache.pulsar.GenericRecord.getNativeObject()

This is because in the class path of 2.9.0 (and 2.8.0) we do not have
org.apache.avro anymore.
If you add it to the NAR you get a ClassCastException.
If you do not add it you get a ClassNotFound.

More context here:
https://github.com/apache/pulsar/issues/11274

My proposal is to add "AVRO" and "Jackson" to the available libraries in
the classpath.
Because without them it is not possible to manipulate of the "Native"
objects returned by GenericRecord.getNativeObject().
I guess that the problem is also for NativeProtobuf and probably for
Schema.getNativeSchema()



Enrico