How apache/avro works
Apache Avro is a cross-language data serialization system. Its principal workflow is to define or parse a schema, encode data using that schema, then decode it—optionally resolving differences between the writer’s and reader’s schemas. The repository also includes container-file, RPC, code-generation, and Hadoop tether capabilities. The source index supports several Python, C, C++, C#, Java gRPC, and tool-dispatch relationships; other language modules are represented as capabilities, without inferred call paths where source was not sampled.
Main entry points: schema.py Python schemas · ipc.py Python IPC · HttpClientServerTest.cs C# HTTP RPC example · io.py Python datum IO
Components 24
Schemas and data
- Python schemas
lang/py/avro/schema.py - Java schemas
lang/java/avro/src/main/java/org/apache/avro/Schema.java - JavaScript schemas
lang/js/lib/schemas.js - C schemas
lang/c/src/avro/schema.h - C datum values
lang/c/src/avro/value.h - C# schemas
lang/csharp/src/apache/main/Schema/Schema.cs - C# generic records
lang/csharp/src/apache/main/Generic/GenericRecord.cs - PHP schemas
lang/php/lib/Schema/AvroSchema.php
Encoding and resolution
- Python datum IO
lang/py/avro/io.py - PHP datum reader
lang/php/lib/Datum/AvroIODatumReader.php - C++ schema resolution
lang/c++/impl/parsing/ResolvingDecoder.cc - C resolved reader
lang/c/src/resolved-reader.c - Ruby datum IO
lang/ruby/lib/avro/io.rb - C# parsing symbols
lang/csharp/src/apache/main/IO/Parsing/Symbol.cs
Container files
- Java data files
lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java - PHP data files
lang/php/lib/DataFile/AvroDataIOReader.php
RPC and integration
- Python IPC
lang/py/avro/ipc.py - Java gRPC client
lang/java/grpc/src/main/java/org/apache/avro/grpc/AvroGrpcClient.java - C# HTTP RPC example
lang/csharp/src/apache/ipc.test/HttpClientServerTest.cs - Java protocols
lang/java/avro/src/main/java/org/apache/avro/Protocol.java - MapReduce tether output
lang/java/mapred/src/main/java/org/apache/avro/mapred/tether/TetherOutputService.java
Tools and generation
- Java CLI tools
lang/java/tools/src/main/java/org/apache/avro/tool/Main.java - C++ code generator
lang/c++/impl/avrogencpp.cc
Other components
- Avro user
Connections 10
- Avro user → Python schemas: defines schema
README.md - Python schemas → Python datum IO: supplies schema
lang/py/avro/io.py - Python IPC → Python datum IO: uses datum IO
lang/py/avro/ipc.py - Python IPC → Python schemas: uses schemas
lang/py/avro/ipc.py - PHP datum reader → PHP schemas: matches schemas
lang/php/lib/Datum/AvroIODatumReader.php - Java gRPC client → Java protocols: gets protocol
lang/java/grpc/src/main/java/org/apache/avro/grpc/AvroGrpcClient.java - Java CLI tools → Avro user: dispatches commands
lang/java/tools/src/main/java/org/apache/avro/tool/Main.java - C++ code generator → Avro user: generates C++ types
lang/c++/impl/avrogencpp.cc - C# HTTP RPC example → C# generic records: sends records
lang/csharp/src/apache/ipc.test/HttpClientServerTest.cs - C# HTTP RPC example → Java protocols: uses protocol