Class BaseAvroConsumer<T extends FieldVector>
java.lang.Object
org.apache.arrow.adapter.avro.consumers.BaseAvroConsumer<T>
- Type Parameters:
- T- vector type.
- All Implemented Interfaces:
- AutoCloseable,- Consumer<T>
- Direct Known Subclasses:
- AvroArraysConsumer,- AvroBooleanConsumer,- AvroBytesConsumer,- AvroDateConsumer,- AvroDecimalConsumer,- AvroDoubleConsumer,- AvroEnumConsumer,- AvroFixedConsumer,- AvroFloatConsumer,- AvroIntConsumer,- AvroLongConsumer,- AvroMapConsumer,- AvroNullConsumer,- AvroStringConsumer,- AvroStructConsumer,- AvroTimeMicroConsumer,- AvroTimeMillisConsumer,- AvroTimestampMicrosConsumer,- AvroTimestampMillisConsumer,- AvroUnionsConsumer
Base class for non-skippable avro consumers.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
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.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.
- 
Field Details- 
vector
- 
currentIndexprotected int currentIndex
 
- 
- 
Constructor Details- 
BaseAvroConsumerConstructs a base avro consumer.- Parameters:
- vector- the vector to consume.
 
 
- 
- 
Method Details- 
addNullpublic void addNull()Description copied from interface:ConsumerAdd null value to vector by making writer position + 1.- Specified by:
- addNullin interface- Consumer<T extends FieldVector>
 
- 
setPositionpublic void setPosition(int index) Description copied from interface:ConsumerSet the position to write value into vector.- Specified by:
- setPositionin interface- Consumer<T extends FieldVector>
 
- 
getVectorDescription copied from interface:ConsumerGet the vector within the consumer.- Specified by:
- getVectorin interface- Consumer<T extends FieldVector>
 
- 
closeDescription copied from interface:ConsumerClose this consumer when occurs exception to avoid potential leak.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Consumer<T extends FieldVector>
- Throws:
- Exception
 
- 
resetValueVectorDescription copied from interface:ConsumerReset the vector within consumer for partial read purpose.- Specified by:
- resetValueVectorin interface- Consumer<T extends FieldVector>
- Returns:
- true if reset is successful, false if reset is not needed.
 
 
-