Interface Producer<T extends FieldVector>
- 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 TypeMethodDescriptionGet 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
resetValueVector
(T vector) Reset the vector within producer.void
setPosition
(int index) Set the position to read value from vector.void
skipNull()
Skip null value in the vector by setting reader position + 1.
-
Method Details
-
produce
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
Reset the vector within producer. -
getVector
T getVector()Get the vector within the producer.
-