aesop
aesop copied to clipboard
binary type seems not supported by avro
Hi,
I'm using your avro schema tool to generate avro schema file, and using linkedin databus as code base to build relay, client and bootstap binaries to run. And I get error when testing mysql varbinary column. Here is the stack trace. So how do you process binary type when loading avro schema?
org.apache.avro.SchemaParseException: Undefined name: "binary"
at org.apache.avro.Schema.parse(Schema.java:935)
at org.apache.avro.Schema.parse(Schema.java:1042)
at org.apache.avro.Schema.parse(Schema.java:977)
at org.apache.avro.Schema.parse(Schema.java:880)
at com.linkedin.databus2.schemas.FileSystemVersionedSchemaSetProvider.loadSchemas(FileSystemVersionedSchemaSetProvider.java:105)
at com.linkedin.databus2.schemas.FileSystemVersionedSchemaSetProvider.loadSchemas(FileSystemVersionedSchemaSetProvider.java:91)
at com.linkedin.databus2.schemas.FileSystemVersionedSchemaSetProvider.loadSchemas(FileSystemVersionedSchemaSetProvider.java:70)
at com.linkedin.databus2.schemas.FileSystemSchemaRegistryService.refreshSchemaSet(FileSystemSchemaRegistryService.java:156)
at com.linkedin.databus2.schemas.FileSystemSchemaRegistryService.initializeSchemaSet(FileSystemSchemaRegistryService.java:135)
at com.linkedin.databus2.schemas.FileSystemSchemaRegistryService.build(FileSystemSchemaRegistryService.java:57)
at com.linkedin.databus2.schemas.StandardSchemaRegistryFactory.createSchemaRegistry(StandardSchemaRegistryFactory.java:50)
at com.linkedin.databus.container.netty.HttpRelay.
@jagadeesh-huliyar @regunathb We need to pick this up. Lets plan for it.
@yanky80 Right now, we are not supporting binary type columns. We will look to support this, but as of now, cant commit on time-frame.
A hackish solution for your current problem : Create a column as varchar and in your application code, serialize the column in your application code to byte[] and then upsert the byte[] into your varchar column.
Now, in your aesop code, where-ever you are reading the column, use the same logic to de-serialize it into the object of your choice.