Slackbot
05/18/2023, 12:13 PMNicoló Boschi
05/18/2023, 2:44 PMJeff Bolle
05/19/2023, 2:11 AMJeff Bolle
05/19/2023, 2:11 AMJeff Bolle
05/19/2023, 3:40 AMRecord does not carry message information
however when I'm looking at the transform function output, it is always producing something. I'm producing my record like this:
return context.newOutputRecordBuilder(Schema.STRING)
.key(id)
.value(jsonObject.toString())
.properties(properties)
.build();
which follows the function example pretty closely. Any helpChristophe Bornet
05/19/2023, 6:38 AMschemaEnable
to false in the ES Sink config, so it tries to write the raw bytes data of the message. But as you have a transform, there's no serialized message.
Is it possible for you to set schemaEnable
to true ? This is a much better option as it uses the record instead of the message. In general, sinks should use the record abstraction, not the message. The default of this config option is false only for backward compatibility reasons.Christophe Bornet
05/19/2023, 6:39 AMChristophe Bornet
05/19/2023, 12:19 PMcast
operation that could be used to transform to STRING.
At the moment, Protobuf is not supported but the pieces are here, just need to add the conversion logic.
If you'd like to contribute by a PR, I would be very happy to help.Jeff Bolle
05/19/2023, 12:23 PMJeff Bolle
05/19/2023, 12:24 PMJeff Bolle
05/19/2023, 12:25 PMChristophe Bornet
05/19/2023, 2:02 PMJeff Bolle
05/19/2023, 2:33 PMJeff Bolle
05/22/2023, 12:15 PMJeff Bolle
05/22/2023, 1:20 PMjava.lang.ClassCastException: class java.lang.String cannot be cast to class org.apache.pulsar.client.api.schema.GenericObject (java.lang.String is in module java.base of loader 'bootstrap'; org.apache.pulsar.client.api.schema.GenericObject is in unnamed module of loader 'app')
at org.apache.pulsar.io.elasticsearch.ElasticSearchSink.extractIdAndDocument(ElasticSearchSink.java:197) ~[8HdTpyUyRQuezR6JAN4j-g/:?]
at org.apache.pulsar.io.elasticsearch.ElasticSearchSink.write(ElasticSearchSink.java:113)
That is specifically the error I'm getting.Jeff Bolle
05/22/2023, 1:31 PMChristophe Bornet
05/23/2023, 10:06 AMChristophe Bornet
05/23/2023, 10:20 AMJeff Bolle
05/23/2023, 1:17 PMJeff Bolle
06/20/2023, 2:12 PM