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()
Consumer
addNull
in interface Consumer<T extends FieldVector>
public void setPosition(int index)
Consumer
setPosition
in interface Consumer<T extends FieldVector>
public FieldVector getVector()
Consumer
getVector
in interface Consumer<T extends FieldVector>
public void close() throws Exception
Consumer
close
in interface AutoCloseable
close
in interface Consumer<T extends FieldVector>
Exception
public boolean resetValueVector(T vector)
Consumer
resetValueVector
in interface Consumer<T extends FieldVector>
Copyright © 2023 The Apache Software Foundation. All rights reserved.