Class ParquetRecordWriter
java.lang.Object
org.apache.drill.exec.store.AbstractRecordWriter
org.apache.drill.exec.store.ParquetOutputRecordWriter
org.apache.drill.exec.store.parquet.ParquetRecordWriter
- All Implemented Interfaces:
RecordWriter
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
class
class
class
Nested classes/interfaces inherited from class org.apache.drill.exec.store.ParquetOutputRecordWriter
ParquetOutputRecordWriter.BaseFieldConverter, ParquetOutputRecordWriter.BigIntParquetConverter, ParquetOutputRecordWriter.BitParquetConverter, ParquetOutputRecordWriter.DateParquetConverter, ParquetOutputRecordWriter.Decimal18ParquetConverter, ParquetOutputRecordWriter.Decimal28DenseParquetConverter, ParquetOutputRecordWriter.Decimal28SparseParquetConverter, ParquetOutputRecordWriter.Decimal38DenseParquetConverter, ParquetOutputRecordWriter.Decimal38SparseParquetConverter, ParquetOutputRecordWriter.Decimal9ParquetConverter, ParquetOutputRecordWriter.Float4ParquetConverter, ParquetOutputRecordWriter.Float8ParquetConverter, ParquetOutputRecordWriter.IntervalDayParquetConverter, ParquetOutputRecordWriter.IntervalParquetConverter, ParquetOutputRecordWriter.IntervalYearParquetConverter, ParquetOutputRecordWriter.IntParquetConverter, ParquetOutputRecordWriter.NullableFieldConverter, ParquetOutputRecordWriter.RepeatedFieldConverter, ParquetOutputRecordWriter.RequiredFieldConverter, ParquetOutputRecordWriter.SmallIntParquetConverter, ParquetOutputRecordWriter.TimeParquetConverter, ParquetOutputRecordWriter.TimeStampParquetConverter, ParquetOutputRecordWriter.TinyIntParquetConverter, ParquetOutputRecordWriter.UInt1ParquetConverter, ParquetOutputRecordWriter.UInt2ParquetConverter, ParquetOutputRecordWriter.UInt4ParquetConverter, ParquetOutputRecordWriter.UInt8ParquetConverter, ParquetOutputRecordWriter.Var16CharParquetConverter, ParquetOutputRecordWriter.VarBinaryParquetConverter, ParquetOutputRecordWriter.VarCharParquetConverter, ParquetOutputRecordWriter.VarDecimalParquetConverter
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.ParquetOutputRecordWriter
ELEMENT, LIST, ZERO_IDX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
void
checkForNewPartition
(int index) Check if the writer should start a new partition, and if so, start a new partitionvoid
cleanup()
void
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.getNewDictConverter
(int fieldId, String fieldName, FieldReader reader) getNewMapConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewRepeatedDictConverter
(int fieldId, String fieldName, FieldReader reader) getNewRepeatedListConverter
(int fieldId, String fieldName, FieldReader reader) getNewRepeatedMapConverter
(int fieldId, String fieldName, FieldReader reader) protected org.apache.parquet.schema.PrimitiveType
void
Initialize the writer.void
Called before starting writing fields in a record.boolean
supportsField
(MaterializedField field) Checks whether this writer supports writing of the given field.void
updateSchema
(VectorAccessible batch) Update the schema in RecordWriter.Methods inherited from class org.apache.drill.exec.store.ParquetOutputRecordWriter
getNewBigIntConverter, getNewBitConverter, getNewDateConverter, getNewDecimal18Converter, getNewDecimal28DenseConverter, getNewDecimal28SparseConverter, getNewDecimal38DenseConverter, getNewDecimal38SparseConverter, getNewDecimal9Converter, getNewFloat4Converter, getNewFloat8Converter, getNewIntConverter, getNewIntervalConverter, getNewIntervalDayConverter, getNewIntervalYearConverter, getNewNullableBigIntConverter, getNewNullableBitConverter, getNewNullableDateConverter, getNewNullableDecimal18Converter, getNewNullableDecimal28DenseConverter, getNewNullableDecimal28SparseConverter, getNewNullableDecimal38DenseConverter, getNewNullableDecimal38SparseConverter, getNewNullableDecimal9Converter, getNewNullableFloat4Converter, getNewNullableFloat8Converter, getNewNullableIntConverter, getNewNullableIntervalConverter, getNewNullableIntervalDayConverter, getNewNullableIntervalYearConverter, getNewNullableSmallIntConverter, getNewNullableTimeConverter, getNewNullableTimeStampConverter, getNewNullableTinyIntConverter, getNewNullableUInt1Converter, getNewNullableUInt2Converter, getNewNullableUInt4Converter, getNewNullableUInt8Converter, getNewNullableVar16CharConverter, getNewNullableVarBinaryConverter, getNewNullableVarCharConverter, getNewNullableVarDecimalConverter, getNewRepeatedBigIntConverter, getNewRepeatedBitConverter, getNewRepeatedDateConverter, getNewRepeatedDecimal18Converter, getNewRepeatedDecimal28DenseConverter, getNewRepeatedDecimal28SparseConverter, getNewRepeatedDecimal38DenseConverter, getNewRepeatedDecimal38SparseConverter, getNewRepeatedDecimal9Converter, getNewRepeatedFloat4Converter, getNewRepeatedFloat8Converter, getNewRepeatedIntConverter, getNewRepeatedIntervalConverter, getNewRepeatedIntervalDayConverter, getNewRepeatedIntervalYearConverter, getNewRepeatedSmallIntConverter, getNewRepeatedTimeConverter, getNewRepeatedTimeStampConverter, getNewRepeatedTinyIntConverter, getNewRepeatedUInt1Converter, getNewRepeatedUInt2Converter, getNewRepeatedUInt4Converter, getNewRepeatedUInt8Converter, getNewRepeatedVar16CharConverter, getNewRepeatedVarBinaryConverter, getNewRepeatedVarCharConverter, getNewRepeatedVarDecimalConverter, getNewSmallIntConverter, getNewTimeConverter, getNewTimeStampConverter, getNewTinyIntConverter, getNewUInt1Converter, getNewUInt2Converter, getNewUInt4Converter, getNewUInt8Converter, getNewVar16CharConverter, getNewVarBinaryConverter, getNewVarCharConverter, getNewVarDecimalConverter, setUp
Methods inherited from class org.apache.drill.exec.store.AbstractRecordWriter
getNewUnionConverter, newPartition, postProcessing, setPartitionVector
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.RecordWriter
getNewUnionConverter, postProcessing
-
Field Details
-
DRILL_VERSION_PROPERTY
- See Also:
-
WRITER_VERSION_PROPERTY
- See Also:
-
-
Constructor Details
-
ParquetRecordWriter
public ParquetRecordWriter(FragmentContext context, ParquetWriter writer) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
init
Description copied from interface:RecordWriter
Initialize the writer.- Parameters:
writerOptions
- Contains key, value pair of settings.- Throws:
IOException
-
updateSchema
Description copied from interface:RecordWriter
Update the schema in RecordWriter. Called at least once before starting writing the records.- Throws:
IOException
-
supportsField
Description copied from interface:RecordWriter
Checks whether this writer supports writing of the given field.- Specified by:
supportsField
in interfaceRecordWriter
- Overrides:
supportsField
in classAbstractRecordWriter
-
getPrimitiveType
- Specified by:
getPrimitiveType
in classParquetOutputRecordWriter
-
checkForNewPartition
public void checkForNewPartition(int index) Description copied from interface:RecordWriter
Check if the writer should start a new partition, and if so, start a new partition- Specified by:
checkForNewPartition
in interfaceRecordWriter
- Overrides:
checkForNewPartition
in classAbstractRecordWriter
-
getNewMapConverter
public EventBasedRecordWriter.FieldConverter getNewMapConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewMapConverter
in interfaceRecordWriter
- Overrides:
getNewMapConverter
in classAbstractRecordWriter
-
getNewRepeatedMapConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedMapConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedMapConverter
in interfaceRecordWriter
- Overrides:
getNewRepeatedMapConverter
in classAbstractRecordWriter
-
getNewRepeatedListConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedListConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedListConverter
in interfaceRecordWriter
- Overrides:
getNewRepeatedListConverter
in classAbstractRecordWriter
-
getNewDictConverter
public EventBasedRecordWriter.FieldConverter getNewDictConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewDictConverter
in interfaceRecordWriter
- Overrides:
getNewDictConverter
in classAbstractRecordWriter
-
getNewRepeatedDictConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedDictConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedDictConverter
in interfaceRecordWriter
- Overrides:
getNewRepeatedDictConverter
in classAbstractRecordWriter
-
startRecord
Description copied from interface:RecordWriter
Called before starting writing fields in a record.- Throws:
IOException
-
endRecord
Description copied from interface:RecordWriter
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.- Throws:
IOException
-
abort
- Throws:
IOException
-
cleanup
- Throws:
IOException
-