java.lang.Object
org.apache.arrow.adapter.avro.producers.BaseAvroProducer<MapVector>
org.apache.arrow.adapter.avro.producers.AvroMapProducer
All Implemented Interfaces:
Producer<MapVector>

public class AvroMapProducer extends BaseAvroProducer<MapVector>
Producer which produces map type values to avro encoder. Write the data to MapVector.
  • Constructor Details

  • Method Details

    • produce

      public void produce(org.apache.avro.io.Encoder encoder) throws IOException
      Description copied from interface: Producer
      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
    • setPosition

      public void setPosition(int index)
      Description copied from class: BaseAvroProducer
      Sets the current index for this producer against the underlying vector.

      For a vector of length N, the valid range is [0, N] inclusive. Setting index = N signifies that no further data is available for production (this is the state the produce will be in when production for the current vector is complete).

      Specified by:
      setPosition in interface Producer<MapVector>
      Overrides:
      setPosition in class BaseAvroProducer<MapVector>
      Parameters:
      index - New current index for the producer
    • resetValueVector

      public void resetValueVector(MapVector vector)
      Description copied from interface: Producer
      Reset the vector within producer.
      Specified by:
      resetValueVector in interface Producer<MapVector>
      Overrides:
      resetValueVector in class BaseAvroProducer<MapVector>