Package | Description |
---|---|
org.apache.avro |
Avro kernel classes.
|
org.apache.avro.compiler.schema | |
org.apache.avro.compiler.specific | |
org.apache.avro.data |
Interfaces and base classes shared by generic, specific and reflect.
|
org.apache.avro.generic |
A generic representation for Avro data.
|
org.apache.avro.io |
Utilities for Encoding and Decoding Avro data.
|
org.apache.avro.io.parsing |
Implementation of Avro schemas as LL(1) grammars.
|
org.apache.avro.reflect |
Use Java reflection to generate schemas and protocols for existing
classes.
|
org.apache.avro.specific |
Generate specific Java classes for schemas and protocols.
|
Modifier and Type | Field and Description |
---|---|
Schema.Field[] |
Resolver.RecordAdjust.readerOrder
Contains (all of) the reader's fields.
|
Modifier and Type | Method and Description |
---|---|
Schema.Field |
Schema.getField(String fieldname)
If 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 Type | Method and Description |
---|---|
List<Schema.Field> |
Schema.getFields()
If this is a record, returns the fields in it.
|
Modifier and Type | Method and Description |
---|---|
void |
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 Type | Method and Description |
---|---|
static Schema |
Schema.createRecord(List<Schema.Field> fields)
Deprecated.
This method allows to create Schema objects that cannot be parsed
by
Schema.Parser.parse(String) . It will be removed in a
future version of Avro. Better use
iSchema.createRecord(String, String, String, boolean, List) to
produce a fully qualified Schema. |
static Schema |
Schema.createRecord(String name,
String doc,
String namespace,
boolean isError,
List<Schema.Field> fields)
Create a named record schema with fields already set.
|
void |
Schema.setFields(List<Schema.Field> fields)
If this is a record, set its fields.
|
Constructor and Description |
---|
AvroMissingFieldException(String message,
Schema.Field field) |
Field(Schema.Field field,
Schema schema)
Constructs a new Field instance with the same
name , doc ,
defaultValue , and order as field has with changing
the schema to the specified one. |
UnresolvedUnionException(Schema unionSchema,
Schema.Field field,
Object unresolvedDatum) |
Modifier and Type | Method and Description |
---|---|
void |
CloningVisitor.PropertyCopier.copy(Schema.Field first,
Schema.Field second) |
static void |
Schemas.copyAliases(Schema.Field from,
Schema.Field to) |
Modifier and Type | Method and Description |
---|---|
static 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.
|
Modifier and Type | Method and Description |
---|---|
protected Schema.Field[] |
RecordBuilderBase.fields() |
Modifier and Type | Method and Description |
---|---|
protected 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.
|
Modifier and Type | Method and Description |
---|---|
GenericRecordBuilder |
GenericRecordBuilder.clear(Schema.Field field)
Clears the value of the given field.
|
Object |
GenericRecordBuilder.get(Schema.Field field)
Gets the value of a field.
|
Object |
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 |
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.
|
Modifier and Type | Method and Description |
---|---|
Schema.Field[] |
ResolvingDecoder.readFieldOrder()
Returns the actual order in which the reader's fields will be returned to the
reader.
|
Schema.Field[] |
ResolvingDecoder.readFieldOrderIfDiff()
Same as
ResolvingDecoder.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). |
Modifier and Type | Field and Description |
---|---|
Schema.Field[] |
Symbol.FieldOrderAction.fields |
Modifier and Type | Method and Description |
---|---|
static Symbol.FieldOrderAction |
Symbol.fieldOrderAction(Schema.Field[] fields) |
Constructor and Description |
---|
FieldOrderAction(Schema.Field[] fields)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected 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) |
Modifier and Type | Method and Description |
---|---|
protected 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) |
Copyright © 2009–2022 The Apache Software Foundation. All rights reserved.