We are trying to find a way to serialize Thrift schema into Avro format.
The flow is as follows:
We have a project 'A' which uses Thrift. The output result object is a thrift based object.
We have project 'B' which uses Avro. We would like to read the project 'A' Thrift schema and produce compatible Avro schema for project 'B'.
We have tried using the ThriftData provided in Apache Avro to serialize the Thrift schema
Schema schema = thriftData.getSchema(XYZ.class);
The execution fails with the message
java.lang.RuntimeException: java.lang.ClassCastException: org.apache.thrift.meta_data.FieldValueMetaData cannot be cast to org.apache.thrift.meta_data.StructMetaData
Any help regarding this would be highly appreciated!