T - vector type.public abstract class BaseAvroConsumer<T extends FieldVector> extends Object implements Consumer<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
currentIndex |
protected T |
vector |
| Constructor and Description |
|---|
BaseAvroConsumer(T vector)
Constructs a base avro consumer.
|
| 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.
|
FieldVector |
getVector()
Get the vector within the consumer.
|
boolean |
resetValueVector(T vector)
Reset the vector within consumer for partial read purpose.
|
void |
setPosition(int index)
Set the position to write value into vector.
|
protected T extends FieldVector vector
protected int currentIndex
public BaseAvroConsumer(T vector)
vector - the vector to consume.public void addNull()
ConsumeraddNull in interface Consumer<T extends FieldVector>public void setPosition(int index)
ConsumersetPosition in interface Consumer<T extends FieldVector>public FieldVector getVector()
ConsumergetVector in interface Consumer<T extends FieldVector>public void close()
throws Exception
Consumerclose in interface AutoCloseableclose in interface Consumer<T extends FieldVector>Exceptionpublic boolean resetValueVector(T vector)
ConsumerresetValueVector in interface Consumer<T extends FieldVector>Copyright © 2024 The Apache Software Foundation. All rights reserved.