Interface Consumer<T extends FieldVector>
- Type Parameters:
- T- The vector within consumer or its delegate, used for partially consume purpose.
- All Superinterfaces:
- AutoCloseable
- All Known Implementing Classes:
- AvroArraysConsumer,- AvroBooleanConsumer,- AvroBytesConsumer,- AvroDateConsumer,- AvroDecimalConsumer,- AvroDecimalConsumer.BytesDecimalConsumer,- AvroDecimalConsumer.FixedDecimalConsumer,- AvroDoubleConsumer,- AvroEnumConsumer,- AvroFixedConsumer,- AvroFloatConsumer,- AvroIntConsumer,- AvroLongConsumer,- AvroMapConsumer,- AvroNullConsumer,- AvroStringConsumer,- AvroStructConsumer,- AvroTimeMicroConsumer,- AvroTimeMillisConsumer,- AvroTimestampMicrosConsumer,- AvroTimestampMillisConsumer,- AvroUnionsConsumer,- BaseAvroConsumer,- SkipConsumer
Interface that is used to consume values from avro decoder.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddNull()Add null value to vector by making writer position + 1.voidclose()Close this consumer when occurs exception to avoid potential leak.voidconsume(org.apache.avro.io.Decoder decoder) Consume a specific type value from avro decoder and write it to vector.Get the vector within the consumer.booleanresetValueVector(T vector) Reset the vector within consumer for partial read purpose.voidsetPosition(int index) Set the position to write value into vector.default booleanIndicates whether the consumer is type ofSkipConsumer.
- 
Method Details- 
consumeConsume a specific type value from avro decoder and write it to vector.- Parameters:
- decoder- avro decoder to read data
- Throws:
- IOException- on error
 
- 
addNullvoid addNull()Add null value to vector by making writer position + 1.
- 
setPositionvoid setPosition(int index) Set the position to write value into vector.
- 
getVectorFieldVector getVector()Get the vector within the consumer.
- 
closeClose this consumer when occurs exception to avoid potential leak.- Specified by:
- closein interface- AutoCloseable
- Throws:
- Exception
 
- 
resetValueVectorReset the vector within consumer for partial read purpose.- Returns:
- true if reset is successful, false if reset is not needed.
 
- 
skippabledefault boolean skippable()Indicates whether the consumer is type ofSkipConsumer.
 
-