Class SkipConsumer
java.lang.Object
org.apache.arrow.adapter.avro.consumers.SkipConsumer
- All Implemented Interfaces:
AutoCloseable
,Consumer
Consumer which skip (throw away) data from the decoder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNull()
Add null value to vector by making writer position + 1.void
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.Get the vector within the consumer.boolean
resetValueVector
(FieldVector vector) Reset the vector within consumer for partial read purpose.void
setPosition
(int index) Set the position to write value into vector.boolean
Indicates whether the consumer is type ofSkipConsumer
.
-
Constructor Details
-
SkipConsumer
-
-
Method Details
-
consume
Description copied from interface:Consumer
Consume a specific type value from avro decoder and write it to vector.- Specified by:
consume
in interfaceConsumer
- Parameters:
decoder
- avro decoder to read data- Throws:
IOException
- on error
-
addNull
public void addNull()Description copied from interface:Consumer
Add null value to vector by making writer position + 1. -
setPosition
public void setPosition(int index) Description copied from interface:Consumer
Set the position to write value into vector.- Specified by:
setPosition
in interfaceConsumer
-
getVector
Description copied from interface:Consumer
Get the vector within the consumer. -
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
- Throws:
Exception
-
resetValueVector
Description copied from interface:Consumer
Reset the vector within consumer for partial read purpose.- Specified by:
resetValueVector
in interfaceConsumer
- Returns:
- true if reset is successful, false if reset is not needed.
-
skippable
public boolean skippable()Description copied from interface:Consumer
Indicates whether the consumer is type ofSkipConsumer
.
-