All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.avro.specific.package.html Maven / Gradle / Ivy






Generate specific Java classes for schemas and protocols.

This API is recommended for most RPC uses and for data applications that always use the same datatypes, i.e., whose schemas are known at compile time. For data applications that accept dynamic datatypes the {@link org.apache.avro.generic generic} API is recommended.

Avro types are mapped to Java as follows:

  • Record, enum, and fixed schemas generate Java class definitions.
  • If a Conversion instance is available for the related logical type, the value will be mapped to the object returned by that Conversion. The logical type conversions for {@code date}, {@code time-millis}, {@code timestamp-millis} and {@code decimal} are pre-defined in the class {@link SpecificCompiler}.
  • All other types are mapped as in the {@link org.apache.avro.generic generic} API.

Note that when a generated class is not found corresponding to a record, enum or fixed schema, a {@link org.apache.avro.generic generic} representation is used. This permits generated classes to be nested within generic data structures.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy