Class AvroStructConsumer
java.lang.Object
org.apache.arrow.adapter.avro.consumers.BaseAvroConsumer<StructVector>
org.apache.arrow.adapter.avro.consumers.AvroStructConsumer
- All Implemented Interfaces:
AutoCloseable
,Consumer<StructVector>
Consumer which consume nested record type values from avro decoder. Write the data to
StructVector
.-
Field Summary
Fields inherited from class org.apache.arrow.adapter.avro.consumers.BaseAvroConsumer
currentIndex, vector
-
Constructor Summary
ConstructorDescriptionAvroStructConsumer
(StructVector vector, Consumer[] delegates) Instantiate a AvroStructConsumer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close this consumer when occurs exception to avoid potential leak.void
consume
(org.apache.avro.io.Decoder decoder) Consume a specific type value from avro decoder and write it to vector.boolean
resetValueVector
(StructVector 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
-
AvroStructConsumer
Instantiate a AvroStructConsumer.
-
-
Method Details
-
consume
Description copied from interface:Consumer
Consume 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:Consumer
Close this consumer when occurs exception to avoid potential leak.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceConsumer<StructVector>
- Overrides:
close
in classBaseAvroConsumer<StructVector>
- Throws:
Exception
-
resetValueVector
Description copied from interface:Consumer
Reset the vector within consumer for partial read purpose.- Specified by:
resetValueVector
in interfaceConsumer<StructVector>
- Overrides:
resetValueVector
in classBaseAvroConsumer<StructVector>
- Returns:
- true if reset is successful, false if reset is not needed.
-