public class SkipConsumer extends Object implements Consumer
| Constructor and Description |
|---|
SkipConsumer(SkipFunction skipFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
FieldVector |
getVector()
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 |
skippable()
Indicates whether the consumer is type of
SkipConsumer. |
public SkipConsumer(SkipFunction skipFunction)
public void consume(org.apache.avro.io.Decoder decoder)
throws IOException
Consumerconsume in interface Consumerdecoder - avro decoder to read dataIOException - on errorpublic void addNull()
Consumerpublic void setPosition(int index)
ConsumersetPosition in interface Consumerpublic FieldVector getVector()
Consumerpublic void close()
throws Exception
Consumerclose in interface AutoCloseableclose in interface ConsumerExceptionpublic boolean resetValueVector(FieldVector vector)
ConsumerresetValueVector in interface Consumerpublic boolean skippable()
ConsumerSkipConsumer.Copyright © 2024 The Apache Software Foundation. All rights reserved.