public class AvroRecordSchema extends GetterBasedSchemaProvider
SchemaProvider
for AVRO generated SpecificRecords and POJOs.
This provider infers a schema from generated SpecificRecord objects, and creates schemas and rows that bind to the appropriate fields. This provider also infers schemas from Java POJO objects, creating a schema that matches that inferred by the AVRO libraries.
Constructor and Description |
---|
AvroRecordSchema() |
Modifier and Type | Method and Description |
---|---|
FieldValueGetterFactory |
fieldValueGetterFactory()
Implementing class should override to return a getter factory.
|
FieldValueTypeInformationFactory |
fieldValueTypeInformationFactory()
Implementing class should override to return a type-information factory.
|
<T> Schema |
schemaFor(TypeDescriptor<T> typeDescriptor)
Lookup a schema for the given type.
|
UserTypeCreatorFactory |
schemaTypeCreatorFactory()
Implementing class should override to return a constructor factory.
|
fromRowFunction, toRowFunction
public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor)
SchemaProvider
public FieldValueGetterFactory fieldValueGetterFactory()
GetterBasedSchemaProvider
public UserTypeCreatorFactory schemaTypeCreatorFactory()
GetterBasedSchemaProvider
public FieldValueTypeInformationFactory fieldValueTypeInformationFactory()
GetterBasedSchemaProvider