Class AvroSerializer

    • Constructor Summary

      Constructors 
      Constructor Description
      AvroSerializer​(org.apache.avro.Schema writerSchema)
      construct an instance with a reader and a writer schema
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] serialize​(java.lang.Object event)
      serialize a GenericRecord or something compatible (like DemoUserV1 in the tests)
      void tearDown()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AvroSerializer

        public AvroSerializer​(org.apache.avro.Schema writerSchema)
        construct an instance with a reader and a writer schema
        Parameters:
        writerSchema - the Avro writer schema
    • Method Detail

      • serialize

        public byte[] serialize​(java.lang.Object event)
                         throws java.lang.IllegalStateException,
                                java.io.IOException
        serialize a GenericRecord or something compatible (like DemoUserV1 in the tests)
        Specified by:
        serialize in interface EventSerializer
        Parameters:
        event - the avro record
        Returns:
        a bytes representation of the record contents.
        Throws:
        java.lang.IllegalStateException - problem with the Avro serialization.
        java.io.IOException
      • tearDown

        public void tearDown()