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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallocate()Allocates new buffer for value vector.voidcleanup()Performs clean up if needed.voidinit(OutputMutator output) Initializes value vector.voidsetValueCount(int valueCount) Sets number of written records.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.store.pojo.PojoWriter
writeField
-
Field Details
-
vector
-
-
Constructor Details
-
AbstractPojoWriter
-
-
Method Details
-
init
Description copied from interface:PojoWriterInitializes value vector.- Specified by:
initin interfacePojoWriter- Parameters:
output- output mutator- Throws:
SchemaChangeException
-
allocate
public void allocate()Description copied from interface:PojoWriterAllocates new buffer for value vector.- Specified by:
allocatein interfacePojoWriter
-
setValueCount
public void setValueCount(int valueCount) Description copied from interface:PojoWriterSets number of written records.- Specified by:
setValueCountin interfacePojoWriter- Parameters:
valueCount- record count
-
cleanup
public void cleanup()Description copied from interface:PojoWriterPerforms clean up if needed.- Specified by:
cleanupin interfacePojoWriter
-