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
Nested ClassesModifier and TypeClassDescriptionclassclassclassclassclassNested 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
FieldsFields inherited from class org.apache.drill.exec.store.ParquetOutputRecordWriter
ELEMENT, LIST, ZERO_IDX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidcheckForNewPartition(int index) Check if the writer should start a new partition, and if so, start a new partitionvoidcleanup()voidCalled 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 invalueHolderat 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.PrimitiveTypevoidInitialize the writer.voidCalled before starting writing fields in a record.booleansupportsField(MaterializedField field) Checks whether this writer supports writing of the given field.voidupdateSchema(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, setUpMethods inherited from class org.apache.drill.exec.store.AbstractRecordWriter
getNewUnionConverter, newPartition, postProcessing, setPartitionVectorMethods 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.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:RecordWriterInitialize the writer.- Parameters:
writerOptions- Contains key, value pair of settings.- Throws:
IOException
-
updateSchema
Description copied from interface:RecordWriterUpdate the schema in RecordWriter. Called at least once before starting writing the records.- Parameters:
batch-- Throws:
IOException
-
supportsField
Description copied from interface:RecordWriterChecks whether this writer supports writing of the given field.- Specified by:
supportsFieldin interfaceRecordWriter- Overrides:
supportsFieldin classAbstractRecordWriter
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classParquetOutputRecordWriter
-
checkForNewPartition
public void checkForNewPartition(int index) Description copied from interface:RecordWriterCheck if the writer should start a new partition, and if so, start a new partition- Specified by:
checkForNewPartitionin interfaceRecordWriter- Overrides:
checkForNewPartitionin classAbstractRecordWriter
-
getNewMapConverter
public EventBasedRecordWriter.FieldConverter getNewMapConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriterAdd the field value given invalueHolderat the given column numberfieldId.- Specified by:
getNewMapConverterin interfaceRecordWriter- Overrides:
getNewMapConverterin classAbstractRecordWriter
-
getNewRepeatedMapConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedMapConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedMapConverterin interfaceRecordWriter- Overrides:
getNewRepeatedMapConverterin classAbstractRecordWriter
-
getNewRepeatedListConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedListConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedListConverterin interfaceRecordWriter- Overrides:
getNewRepeatedListConverterin classAbstractRecordWriter
-
getNewDictConverter
public EventBasedRecordWriter.FieldConverter getNewDictConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewDictConverterin interfaceRecordWriter- Overrides:
getNewDictConverterin classAbstractRecordWriter
-
getNewRepeatedDictConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedDictConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedDictConverterin interfaceRecordWriter- Overrides:
getNewRepeatedDictConverterin classAbstractRecordWriter
-
startRecord
Description copied from interface:RecordWriterCalled before starting writing fields in a record.- Throws:
IOException
-
endRecord
Description copied from interface:RecordWriterCalled after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.- Throws:
IOException
-
abort
- Throws:
IOException
-
cleanup
- Throws:
IOException
-