Class DereferencedAvroSchemaParser<U>

  • Type Parameters:
    U - The type of the data container
    All Implemented Interfaces:
    SchemaParser<org.apache.avro.Schema,​U>

    public class DereferencedAvroSchemaParser<U>
    extends AvroSchemaParser<U>
    An implementation of AvroSchemaParser that extracts schemas directly from Avro records. This parser retrieves the schema embedded within the Avro record itself, allowing for schema resolution without external schema references.
    • Constructor Detail

      • DereferencedAvroSchemaParser

        public DereferencedAvroSchemaParser()
        Constructs a new DereferencedAvroSchemaParser.
    • Method Detail

      • getSchemaFromData

        public ParsedSchema<org.apache.avro.Schema> getSchemaFromData​(Record<U> data)
        Description copied from interface: SchemaParser
        Extracts the schema from a given data record. This method is particularly useful for artifact types like AVRO, where the schema can be extracted directly from the Java object.
        Specified by:
        getSchemaFromData in interface SchemaParser<org.apache.avro.Schema,​U>
        Overrides:
        getSchemaFromData in class AvroSchemaParser<U>
        Parameters:
        data - The record from which to extract the schema.
        Returns:
        A ParsedSchema containing both the raw schema (as bytes) and the parsed schema.