Package org.apache.drill.exec.store.pojo
Class AbstractPojoWriter<V extends ValueVector>
java.lang.Object
org.apache.drill.exec.store.pojo.AbstractPojoWriter<V>
- All Implemented Interfaces:
PojoWriter
- Direct Known Subclasses:
PojoWriters.BitWriter
,PojoWriters.DecimalWriter
,PojoWriters.DoubleWriter
,PojoWriters.EnumWriter
,PojoWriters.FloatWriter
,PojoWriters.IntWriter
,PojoWriters.LongWriter
,PojoWriters.NBigIntWriter
,PojoWriters.NBooleanWriter
,PojoWriters.NDoubleWriter
,PojoWriters.NFloatWriter
,PojoWriters.NIntWriter
,PojoWriters.NTimeStampWriter
,PojoWriters.StringWriter
public abstract class AbstractPojoWriter<V extends ValueVector>
extends Object
implements PojoWriter
Parent class for all pojo writers created for each field.
Contains common logic for initializing value vector, stores field name and its type.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate()
Allocates new buffer for value vector.void
cleanup()
Performs clean up if needed.void
init
(OutputMutator output) Initializes value vector.void
setValueCount
(int valueCount) Sets number of written records.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.store.pojo.PojoWriter
writeField
-
Field Details
-
vector
-
-
Constructor Details
-
AbstractPojoWriter
-
-
Method Details
-
init
Description copied from interface:PojoWriter
Initializes value vector.- Specified by:
init
in interfacePojoWriter
- Parameters:
output
- output mutator- Throws:
SchemaChangeException
-
allocate
public void allocate()Description copied from interface:PojoWriter
Allocates new buffer for value vector.- Specified by:
allocate
in interfacePojoWriter
-
setValueCount
public void setValueCount(int valueCount) Description copied from interface:PojoWriter
Sets number of written records.- Specified by:
setValueCount
in interfacePojoWriter
- Parameters:
valueCount
- record count
-
cleanup
public void cleanup()Description copied from interface:PojoWriter
Performs clean up if needed.- Specified by:
cleanup
in interfacePojoWriter
-