Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binary type seems not supported by avro #33

Open
yanky80 opened this issue Jul 23, 2015 · 2 comments
Open

binary type seems not supported by avro #33

yanky80 opened this issue Jul 23, 2015 · 2 comments

Comments

@yanky80
Copy link

yanky80 commented Jul 23, 2015

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.(HttpRelay.java:132)
at com.linkedin.databus2.relay.DatabusRelayMain.(DatabusRelayMain.java:100)
at com.linkedin.databus.relay.example.PersonRelayServer.main(PersonRelayServer.java:74)

@aryaKetan
Copy link
Contributor

@jagadeesh-huliyar @regunathb We need to pick this up. Lets plan for it.

@aryaKetan
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants