Avro 1.4.0 API

Avro is a data serialization system.


org.apache.avro Avro kernel classes.
org.apache.avro.file A container file for Avro data.
org.apache.avro.generic A generic representation for Avro data.
org.apache.avro.io Input/output utilities.
org.apache.avro.io.parsing Implementation of Avro schemas as LL(1) grammars.
org.apache.avro.ipc Support for inter-process calls.
org.apache.avro.ipc.stats Utilities to collect and display IPC statistics.
org.apache.avro.mapred Run Hadoop MapReduce jobs over Avro data, with map and reduce functions written in Java.
org.apache.avro.mapred.tether Run Hadoop MapReduce jobs over Avro data, with map and reduce functions run in a sub-process.
org.apache.avro.reflect Use Java reflection to generate schemas and protocols for existing classes.
org.apache.avro.specific Generate specific Java classes for schemas and protocols.
org.apache.avro.tool Avro command-line tool.
org.apache.avro.util Common utility classes.


Avro is a data serialization system.


Avro provides:


Avro relies on schemas. When Avro data is read, the schema used when writing it is always present. This permits each datum to be written with no per-value overheads, making serialization both fast and small. This also facilitates use with dynamic, scripting languages, since data, together with its schema, is fully self-describing.

When Avro data is stored in a file, its schema is stored with it, so that files may be processed later by any program. If the program reading the data expects a different schema this can be easily resolved, since both schemas are present.

When Avro is used in RPC, the client and server exchange schemas in the connection handshake. (This can be optimized so that, for most calls, no schemas are actually transmitted.) Since both client and server both have the other's full schema, correspondence between same named fields, missing fields, extra fields, etc. can all be easily resolved.

Avro schemas are defined with with JSON . This facilitates implementation in languages that already have JSON libraries.

Comparison with other systems

Avro provides functionality similar to systems such as Thrift, Protocol Buffers, etc. Avro differs from these systems in the following fundamental aspects.

Copyright © 2010 The Apache Software Foundation