Class AvroSerializer

    • Constructor Detail

      • AvroSerializer

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

      • 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
        Returns:
        A ByteBuffer contains the serialized result.