Class AbstractAvroSerializer

  • All Implemented Interfaces:
    Serializable, AvroSchemaRegistry
    Direct Known Subclasses:
    FixedAvroSerializer, GenericAvroSerializer

    public abstract class AbstractAvroSerializer
    extends com.esotericsoftware.kryo.Serializer<org.apache.avro.generic.GenericContainer>
    implements AvroSchemaRegistry
    This abstract class can be extended to implement concrete classes capable of (de)serializing generic avro objects across a Topology. The methods in the AvroSchemaRegistry interface specify how schemas can be mapped to unique identifiers and vice versa. Implementations based on pre-defining schemas or utilizing an external schema registry are provided.
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractAvroSerializer

        public AbstractAvroSerializer()
    • Method Detail

      • write

        public void write​(com.esotericsoftware.kryo.Kryo kryo,
                          com.esotericsoftware.kryo.io.Output output,
                          org.apache.avro.generic.GenericContainer record)
        Specified by:
        write in class com.esotericsoftware.kryo.Serializer<org.apache.avro.generic.GenericContainer>
      • read

        public org.apache.avro.generic.GenericContainer read​(com.esotericsoftware.kryo.Kryo kryo,
                                                             com.esotericsoftware.kryo.io.Input input,
                                                             Class<? extends org.apache.avro.generic.GenericContainer> someClass)
        Specified by:
        read in class com.esotericsoftware.kryo.Serializer<org.apache.avro.generic.GenericContainer>