Class AbstractAvroSerializer

java.lang.Object
com.esotericsoftware.kryo.Serializer<org.apache.avro.generic.GenericContainer>
org.apache.storm.hdfs.avro.AbstractAvroSerializer
All Implemented Interfaces:
Serializable, AvroSchemaRegistry
Direct Known Subclasses:
ConfluentAvroSerializer, 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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    void
    write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, org.apache.avro.generic.GenericContainer record)
     

    Methods inherited from class com.esotericsoftware.kryo.Serializer

    copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.storm.hdfs.avro.AvroSchemaRegistry

    getFingerprint, getSchema
  • Constructor Details

    • AbstractAvroSerializer

      public AbstractAvroSerializer()
  • Method Details

    • 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>