public class AvroSerializer extends java.lang.Object implements EventSerializer
| Constructor and Description |
|---|
AvroSerializer(org.apache.avro.Schema writerSchema)
construct an instance with a reader and a writer schema
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
serialize(java.lang.Object event,
SerializationType serializationType)
serialize a GenericRecord or something compatible (like DemoUserV1 in the tests)
|
void |
tearDown() |
public AvroSerializer(org.apache.avro.Schema writerSchema)
writerSchema - the Avro writer schemapublic byte[] serialize(java.lang.Object event,
SerializationType serializationType)
throws java.lang.IllegalStateException,
java.io.IOException
serialize in interface EventSerializerevent - the avro recordserializationType - the kind of serialization to use for the eventjava.lang.IllegalStateException - problem with the Avro serialization.java.io.IOExceptionpublic void tearDown()