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
Consumer
consume
in interface Consumer
decoder
- avro decoder to read dataIOException
- on errorpublic void addNull()
Consumer
public void setPosition(int index)
Consumer
setPosition
in interface Consumer
public FieldVector getVector()
Consumer
public void close() throws Exception
Consumer
close
in interface AutoCloseable
close
in interface Consumer
Exception
public boolean resetValueVector(FieldVector vector)
Consumer
resetValueVector
in interface Consumer
public boolean skippable()
Consumer
SkipConsumer
.Copyright © 2023 The Apache Software Foundation. All rights reserved.