Class AvroSerializer

All Implemented Interfaces:
Serializable, IOutputSerializer

public class AvroSerializer extends Object implements IOutputSerializer, Serializable
AvroSerializer uses generic(without code generation) instead of specific(with code generation) writers.
See Also:
  • Constructor Details

    • AvroSerializer

      public AvroSerializer(String schemaString, List<String> fieldNames)
      AvroSerializer Constructor.
      schemaString - schema string
      fieldNames - field names
  • Method Details

    • write

      public ByteBuffer write(List<Object> data, ByteBuffer buffer)
      Description copied from interface: IOutputSerializer
      Serialize the data to a ByteBuffer. The caller can pass in a ByteBuffer so that the serializer can reuse the memory.
      Specified by:
      write in interface IOutputSerializer
      A ByteBuffer contains the serialized result.