MATLAB® Interface for Apache Avro™
- Requires MATLAB release R2017b or newer
3rd Party Products:
For building the JAR file:
Apache Avro™ is a data serialization system. Avro provides a compact, fast, binary data format and simple integration with dynamic languages. Avro relies heavily on schemas. When data is stored in a file, the schema is stored with it, so that files may be processed later by any program.
The MATLAB interface for Apache Avro provides for reading and writing of Apache Avro files from within MATLAB. Functionality includes:
- Read and write of local Avro files
- Access to metadata of an Avro file
Installation of the interface requires building the support package (JAR file) using Maven.
Before proceeding, ensure that the below products are installed:
a) Java SDK
The links to download these products are provided in the section 3rd party products.
Please see the documentation for detailed installation instructions. To get started quickly:
Build the JAR file
To install the interface, first build the JAR file.
cd Software/Java mvn clean package
The maven build places the Avro package in the location /Software/MATLAB/lib/jar/. Note the full path to the JAR file as this should be added to the static path in the next step.
Install the MATLAB package
Open MATLAB and install the support package.
cd Software/MATLAB startup
The startup script checks if the required packages are added to the static path. To set the static path, see detailed instructions to install.
To write a variable to an Avro file:
data = randn(1e2,5); avrowrite('tmp.avro', data);
The same file can be read with
tmp = avroread('tmp.avro');
A few unit tests are provided in the Software/MATLAB/test/unit folder. These can be run with
cd Software/MATLAB/test/unit; runtests;
For more details, look at the Basic Usage document.
See documentation for more information.
The license for MATLAB interface for Avro is available in the LICENSE.TXT file in this GitHub repository. This package uses certain third-party content which is licensed under separate license agreements. See the pom.xml file for third-party software downloaded at build time.
Provide suggestions for additional features or capabilities using the following link: