Package org.apache.avro.protobuf
package org.apache.avro.protobuf
Protocol Buffer
compatibility.
Protocol Buffer primitive types are mapped to Avro types as follows:
| protobuf type | Avro type |
|---|---|
| int32, uint32, sint32, fixed32, sfixed32 | int |
| int64, uint64, sint64, fixed64, sfixed64 | long |
| float | float |
| double | double |
| bool | boolean |
| string | string |
| bytes | bytes |
| enum | enum |
| message | record |
Notes:
- protobuf repeated fields are represented as Avro arrays
- protobuf default values are translated to Avro default values
-
ClassesClassDescriptionUtilities for serializing Protobuf data in Avro format.
DatumReaderfor generated Protobuf classes.DatumWriterfor generated protobuf classes.