Conversion from Apache Avro IDL files to Avro Schama and Avro Protocol files

Conversion from Apache Avro IDL files to Avro Schama and Avro Protocol files

Avro schema registry hasn’t supprt storing of Avro IDL files yet, so one of the solutions to maintain consistency of Avro schemas is to use Avro IDL file as source of truth and generate avsc files based on it.

Requirements:

  • downloaded latest version of avro-tools.jar;
  • JDK 8 or Open JDK 8 installed;
  • prepared example.avdl file like below:

 

Conversion using avro-tools

 

How to generate avpr from avdl file

The result:

 

How to generate avsc from avdl file

The result:

 

 

 

If you think this tutorial is valuable, please leave me +1  or share it. This action will allow me to reach a wider audience.

Thank you.

Leave a Reply

1 Comment on "Conversion from Apache Avro IDL files to Avro Schama and Avro Protocol files"

avatar
  Subscribe  
newest oldest most voted
Notify of
kavya
Guest

Hi article is nice, java convert string to int is a frequently asked question in java interview.
Parsing is a process of converting one data type to another. For example String to integer.

Close Menu