Enchiridion: A small manual or handbook. It's a bit like a tech cook book, but a bigger, fancier, SEO-optimizabler word.
This project describes how to do many common Java tasks using the Avro serialization library.
The main project uses the latest release of Avro 1.12.0, but includes modules that run the same tests on previous versions of Avro.
module | description |
---|---|
avro-resources | Reusable resources for testing Avro (Schema JSON strings, etc). |
core | Unit tests and examples for the Avro Java SDK. |
core17x | Helper project for running tests in Avro 1.7.x |
core18x | Helper project for running tests in Avro 1.8.x |
core19x | Helper project for running tests in Avro 1.9.x |
core110x | Helper project for running tests in Avro 1.10.x |
core111x | Helper project for running tests in Avro 1.11.x |
core-master-snapshot | Helper project for running tests in the latest SNAPSHOT releases from the Avro master branch. |
ipc | Unit tests and examples for client/server communication with Avro protocols. |
plugin | Using the maven plugin to generate Avro classes. |
I want to... | See... |
---|---|
Read/write one datum to a byte array | SerializeToBytesTest |
Read/write one datum to a ByteBuffer | SerializeToBytesTest |
Read/write one datum to an Avro JSON String | SerializeToJsonTest |
Read from/write to an Avro file | AvroFileTest |
Append a record to an Avro file | AvroFileTest |
Logical Types (spec)
I want to... | See... |
---|---|
Use BigDecimal datum with a GenericData model | DecimalPrecisionAndScaleTest (see the static block) |
Create my own logical type | TODO |
Schema resolution (spec)
I want to... | See... |
---|---|
Evolve my schema by adding a field | EvolveAddAFieldTest |
... by removing a field | EvolveRemoveAFieldTest |
... by renaming a field | EvolveRenameAFieldTest |
... by reordering fields | EvolveReorderFieldsTest |
... by widening a primitive | EvolveWidenPrimitivesTest |
... by adding a union | EvolveUnionTest |
... by adding an enum symbol | |
... by removing an enum symbol |
# Get the Avro source code.
git clone [email protected]:apache/avro.git
# Create an Avro docker image with all of the necessary tools.
cd avro
./build.sh docker
# Run a container with your local .m2 mounted
docker run --rm -t -i \
-v $PWD:$HOME/avro -w $HOME/avro \
-v $HOME/.m2:$HOME/.m2 \
-u $USER avro-build-$USER \
./build.sh test
Apache Avro™, Avro™, Apache®, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation.