Type Parameters:
T - The vector within producer or its delegate, used for partially produce purpose.
All Known Implementing Classes:
AvroBigIntProducer, AvroBooleanProducer, AvroBytesProducer, AvroDateDayProducer, AvroDateMilliProducer, AvroDecimal256Producer, AvroDecimalProducer, AvroEnumProducer, AvroFixedSizeBinaryProducer, AvroFixedSizeListProducer, AvroFloat2Producer, AvroFloat4Producer, AvroFloat8Producer, AvroIntProducer, AvroListProducer, AvroMapProducer, AvroNullableProducer, AvroNullProducer, AvroSmallIntProducer, AvroStringProducer, AvroStructProducer, AvroTimeMicroProducer, AvroTimeMilliProducer, AvroTimeNanoProducer, AvroTimeSecProducer, AvroTimestampMicroProducer, AvroTimestampMicroTzProducer, AvroTimestampMilliProducer, AvroTimestampMilliTzProducer, AvroTimestampNanoProducer, AvroTimestampNanoTzProducer, AvroTimestampSecProducer, AvroTimestampSecTzProducer, AvroTinyIntProducer, AvroUint1Producer, AvroUint2Producer, AvroUint4Producer, AvroUint8Producer, BaseAvroProducer

public interface Producer<T extends FieldVector>
Interface that is used to produce values to avro encoder.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the vector within the producer.
    void
    produce(org.apache.avro.io.Encoder encoder)
    Produce a specific type value from the vector and write it to avro encoder.
    void
    Reset the vector within producer.
    void
    setPosition(int index)
    Set the position to read value from vector.
    void
    Skip null value in the vector by setting reader position + 1.
  • Method Details

    • produce

      void produce(org.apache.avro.io.Encoder encoder) throws IOException
      Produce a specific type value from the vector and write it to avro encoder.
      Parameters:
      encoder - avro encoder to write data
      Throws:
      IOException - on error
    • skipNull

      void skipNull()
      Skip null value in the vector by setting reader position + 1.
    • setPosition

      void setPosition(int index)
      Set the position to read value from vector.
    • resetValueVector

      void resetValueVector(T vector)
      Reset the vector within producer.
    • getVector

      T getVector()
      Get the vector within the producer.