nicoloboschi opened a new pull request, #15845:
URL: https://github.com/apache/pulsar/pull/15845

   ### Motivation
   JDBC sinks doesn't support Avro datatypes like Utf8.
   
   ```
   2022-05-30T16:16:35,850+0000 [pool-5-thread-1] ERROR 
org.apache.pulsar.io.jdbc.JdbcAbstractSink - Got exception 
   java.lang.Exception: Not support value type, need to add it. class 
org.apache.avro.util.Utf8
        at 
org.apache.pulsar.io.jdbc.BaseJdbcAutoSchemaSink.setColumnValue(BaseJdbcAutoSchemaSink.java:134)
 ~[pulsar-io-jdbc-core-2.10.0.5-SNAPSHOT.jar:?]
        at 
org.apache.pulsar.io.jdbc.BaseJdbcAutoSchemaSink.bindValue(BaseJdbcAutoSchemaSink.java:89)
 ~[pulsar-io-jdbc-core-2.10.0.5-SNAPSHOT.jar:?]
        at 
org.apache.pulsar.io.jdbc.JdbcAbstractSink.flush(JdbcAbstractSink.java:206) 
~[pulsar-io-jdbc-core-2.10.0.5-SNAPSHOT.jar:?]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 [?:?]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
[?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
   ```
   ### Modifications
   
   Added converted (inspired by the ElasticSearch one) to do proper conversion 
of data, from Avro generic record to JDBC compatible type.
   
   - [x] `doc-not-needed` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to