public class ParquetRecordWriter extends ParquetOutputRecordWriter
Modifier and Type | Class and Description |
---|---|
class |
ParquetRecordWriter.DictParquetConverter |
class |
ParquetRecordWriter.MapParquetConverter |
class |
ParquetRecordWriter.RepeatedDictParquetConverter |
class |
ParquetRecordWriter.RepeatedListParquetConverter |
class |
ParquetRecordWriter.RepeatedMapParquetConverter |
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
Modifier and Type | Field and Description |
---|---|
static String |
DRILL_VERSION_PROPERTY |
static String |
WRITER_VERSION_PROPERTY |
ELEMENT, LIST, ZERO_IDX
Constructor and Description |
---|
ParquetRecordWriter(FragmentContext context,
ParquetWriter writer) |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
void |
checkForNewPartition(int index)
Check if the writer should start a new partition, and if so, start a new partition
|
void |
cleanup() |
void |
endRecord()
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.
|
EventBasedRecordWriter.FieldConverter |
getNewDictConverter(int fieldId,
String fieldName,
FieldReader reader) |
EventBasedRecordWriter.FieldConverter |
getNewMapConverter(int fieldId,
String fieldName,
FieldReader reader)
Add the field value given in
valueHolder at the given column number fieldId . |
EventBasedRecordWriter.FieldConverter |
getNewRepeatedDictConverter(int fieldId,
String fieldName,
FieldReader reader) |
EventBasedRecordWriter.FieldConverter |
getNewRepeatedListConverter(int fieldId,
String fieldName,
FieldReader reader) |
EventBasedRecordWriter.FieldConverter |
getNewRepeatedMapConverter(int fieldId,
String fieldName,
FieldReader reader) |
protected org.apache.parquet.schema.PrimitiveType |
getPrimitiveType(MaterializedField field) |
void |
init(Map<String,String> writerOptions)
Initialize the writer.
|
void |
startRecord()
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.
|
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
getNewUnionConverter, newPartition, postProcessing, setPartitionVector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNewUnionConverter, postProcessing
public static final String DRILL_VERSION_PROPERTY
public static final String WRITER_VERSION_PROPERTY
public ParquetRecordWriter(FragmentContext context, ParquetWriter writer) throws OutOfMemoryException
OutOfMemoryException
public void init(Map<String,String> writerOptions) throws IOException
RecordWriter
writerOptions
- Contains key, value pair of settings.IOException
public void updateSchema(VectorAccessible batch) throws IOException
RecordWriter
IOException
public boolean supportsField(MaterializedField field)
RecordWriter
supportsField
in interface RecordWriter
supportsField
in class AbstractRecordWriter
protected org.apache.parquet.schema.PrimitiveType getPrimitiveType(MaterializedField field)
getPrimitiveType
in class ParquetOutputRecordWriter
public void checkForNewPartition(int index)
RecordWriter
checkForNewPartition
in interface RecordWriter
checkForNewPartition
in class AbstractRecordWriter
public EventBasedRecordWriter.FieldConverter getNewMapConverter(int fieldId, String fieldName, FieldReader reader)
RecordWriter
valueHolder
at the given column number fieldId
.getNewMapConverter
in interface RecordWriter
getNewMapConverter
in class AbstractRecordWriter
public EventBasedRecordWriter.FieldConverter getNewRepeatedMapConverter(int fieldId, String fieldName, FieldReader reader)
getNewRepeatedMapConverter
in interface RecordWriter
getNewRepeatedMapConverter
in class AbstractRecordWriter
public EventBasedRecordWriter.FieldConverter getNewRepeatedListConverter(int fieldId, String fieldName, FieldReader reader)
getNewRepeatedListConverter
in interface RecordWriter
getNewRepeatedListConverter
in class AbstractRecordWriter
public EventBasedRecordWriter.FieldConverter getNewDictConverter(int fieldId, String fieldName, FieldReader reader)
getNewDictConverter
in interface RecordWriter
getNewDictConverter
in class AbstractRecordWriter
public EventBasedRecordWriter.FieldConverter getNewRepeatedDictConverter(int fieldId, String fieldName, FieldReader reader)
getNewRepeatedDictConverter
in interface RecordWriter
getNewRepeatedDictConverter
in class AbstractRecordWriter
public void startRecord() throws IOException
RecordWriter
IOException
public void endRecord() throws IOException
RecordWriter
IOException
public void abort() throws IOException
IOException
public void cleanup() throws IOException
IOException
Copyright © 1970 The Apache Software Foundation. All rights reserved.