Uses of Class
org.apache.avro.Schema.Field
Package
Description
Avro kernel classes.
Interfaces and base classes shared by generic, specific and reflect.
A generic representation for Avro data.
Utilities for Encoding and Decoding Avro data.
Implementation of Avro schemas as LL(1) grammars.
Use Java reflection to generate schemas and protocols for existing
classes.
Generate specific Java classes for schemas and protocols.
-
Uses of Schema.Field in org.apache.avro
Modifier and TypeFieldDescriptionfinal Schema.Field[]
Resolver.RecordAdjust.readerOrder
Contains (all of) the reader's fields.Modifier and TypeMethodDescriptionIf this is a record, returns the Field with the given name fieldName.static Schema.Field
SchemaCompatibility.lookupWriterField
(Schema writerSchema, Schema.Field readerField) Identifies the writer field that corresponds to the specified reader field.Modifier and TypeMethodDescriptionSchema.getFields()
If this is a record, returns the fields in it.Modifier and TypeMethodDescriptionvoid
AvroMissingFieldException.addParentField
(Schema.Field field) static Schema.Field
SchemaCompatibility.lookupWriterField
(Schema writerSchema, Schema.Field readerField) Identifies the writer field that corresponds to the specified reader field.Modifier and TypeMethodDescriptionstatic Schema
Schema.createRecord
(String name, String doc, String namespace, boolean isError, List<Schema.Field> fields) Create a named record schema with fields already set.static Schema
Schema.createRecord
(List<Schema.Field> fields) Deprecated.void
Schema.setFields
(List<Schema.Field> fields) If this is a record, set its fields.ModifierConstructorDescriptionAvroMissingFieldException
(String message, Schema.Field field) Field
(Schema.Field field, Schema schema) Constructs a new Field instance with the samename
,doc
,defaultValue
, andorder
asfield
has with changing the schema to the specified one.UnresolvedUnionException
(Schema unionSchema, Schema.Field field, Object unresolvedDatum) -
Uses of Schema.Field in org.apache.avro.compiler.schema
Modifier and TypeMethodDescriptionvoid
CloningVisitor.PropertyCopier.copy
(Schema.Field first, Schema.Field second) static void
Schemas.copyAliases
(Schema.Field from, Schema.Field to) -
Uses of Schema.Field in org.apache.avro.compiler.specific
Modifier and TypeMethodDescriptionstatic String
SpecificCompiler.generateClearMethod
(Schema schema, Schema.Field field) Generates the name of a field "clear" method.static String
SpecificCompiler.generateGetBuilderMethod
(Schema schema, Schema.Field field) Generates the name of a field Builder accessor method.static String
SpecificCompiler.generateGetMethod
(Schema schema, Schema.Field field) Generates the name of a field accessor method.static String
SpecificCompiler.generateGetOptionalMethod
(Schema schema, Schema.Field field) Generates the name of a field accessor method that returns a Java 8 Optional.static String
SpecificCompiler.generateHasBuilderMethod
(Schema schema, Schema.Field field) Generates the name of a field Builder "has" method.static String
SpecificCompiler.generateHasMethod
(Schema schema, Schema.Field field) Generates the name of a field "has" method.static String
SpecificCompiler.generateSetBuilderMethod
(Schema schema, Schema.Field field) Generates the name of a field Builder mutator method.static String
SpecificCompiler.generateSetMethod
(Schema schema, Schema.Field field) Generates the name of a field mutator method. -
Uses of Schema.Field in org.apache.avro.data
Modifier and TypeMethodDescriptionprotected Object
RecordBuilderBase.defaultValue
(Schema.Field field) Gets the default value of the given field, if any.protected static boolean
RecordBuilderBase.isValidValue
(Schema.Field f, Object value) Tests whether a value is valid for a specified field.protected void
RecordBuilderBase.validate
(Schema.Field field, Object value) Validates that a particular value for a given field is valid according to the following algorithm: 1. -
Uses of Schema.Field in org.apache.avro.generic
Modifier and TypeMethodDescriptionGenericRecordBuilder.clear
(Schema.Field field) Clears the value of the given field.GenericRecordBuilder.get
(Schema.Field field) Gets the value of a field.GenericData.getDefaultValue
(Schema.Field field) Gets the default value of the given field, if any.boolean
GenericRecordBuilder.has
(Schema.Field field) Checks whether a field has been set.protected void
GenericDatumReader.readField
(Object record, Schema.Field field, Object oldDatum, ResolvingDecoder in, Object state) Called to read a single field of a record.GenericRecordBuilder.set
(Schema.Field field, Object value) Sets the value of a field.protected void
GenericDatumWriter.writeField
(Object datum, Schema.Field f, Encoder out, Object state) Called to write a single field of a record. -
Uses of Schema.Field in org.apache.avro.io
Modifier and TypeMethodDescriptionfinal Schema.Field[]
ResolvingDecoder.readFieldOrder()
Returns the actual order in which the reader's fields will be returned to the reader.final Schema.Field[]
ResolvingDecoder.readFieldOrderIfDiff()
Same asResolvingDecoder.readFieldOrder()
except that it returns null if there was no reordering of fields, i.e., if the correct thing for the reader to do is to read (all) of its fields in the order specified by its own schema (useful for optimizations). -
Uses of Schema.Field in org.apache.avro.io.parsing
Modifier and TypeMethodDescriptionstatic Symbol.FieldOrderAction
Symbol.fieldOrderAction
(Schema.Field[] fields) -
Uses of Schema.Field in org.apache.avro.reflect
Modifier and TypeMethodDescriptionprotected void
ReflectDatumReader.readField
(Object record, Schema.Field field, Object oldDatum, ResolvingDecoder in, Object state) protected void
ReflectDatumWriter.writeField
(Object record, Schema.Field f, Encoder out, Object state) -
Uses of Schema.Field in org.apache.avro.specific
Modifier and TypeMethodDescriptionprotected void
SpecificDatumReader.readField
(Object record, Schema.Field field, Object oldDatum, ResolvingDecoder in, Object state) protected void
SpecificDatumWriter.writeField
(Object datum, Schema.Field f, Encoder out, Object state)
SchemaParser.parse(CharSequence)
.