Class AvroMapConsumer
java.lang.Object
org.apache.arrow.adapter.avro.consumers.BaseAvroConsumer<MapVector>
org.apache.arrow.adapter.avro.consumers.AvroMapConsumer
- All Implemented Interfaces:
AutoCloseable,Consumer<MapVector>
Consumer which consume map type values from avro decoder. Write the data to
MapVector.-
Field Summary
Fields inherited from class org.apache.arrow.adapter.avro.consumers.BaseAvroConsumer
currentIndex, vector -
Constructor Summary
ConstructorsConstructorDescriptionAvroMapConsumer(MapVector vector, Consumer delegate) Instantiate a AvroMapConsumer. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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.booleanresetValueVector(MapVector vector) Reset the vector within consumer for partial read purpose.Methods inherited from class org.apache.arrow.adapter.avro.consumers.BaseAvroConsumer
addNull, getVector, setPosition
-
Constructor Details
-
AvroMapConsumer
Instantiate a AvroMapConsumer.
-
-
Method Details
-
consume
Description copied from interface:ConsumerConsume a specific type value from avro decoder and write it to vector.- Parameters:
decoder- avro decoder to read data- Throws:
IOException- on error
-
close
Description copied from interface:ConsumerClose this consumer when occurs exception to avoid potential leak.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConsumer<MapVector>- Overrides:
closein classBaseAvroConsumer<MapVector>- Throws:
Exception
-
resetValueVector
Description copied from interface:ConsumerReset the vector within consumer for partial read purpose.- Specified by:
resetValueVectorin interfaceConsumer<MapVector>- Overrides:
resetValueVectorin classBaseAvroConsumer<MapVector>- Returns:
- true if reset is successful, false if reset is not needed.
-