T - The type of objects written by the constructed ParquetWriter.SELF - The type of this builder that is returned by builder methodspublic abstract static class ParquetWriter.Builder<T,SELF extends ParquetWriter.Builder<T,SELF>> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Builder(OutputFile path) |
protected |
Builder(org.apache.hadoop.fs.Path path) |
| Modifier and Type | Method and Description |
|---|---|
ParquetWriter<T> |
build()
Build a
ParquetWriter with the accumulated configuration. |
SELF |
config(String property,
String value)
Set a property that will be available to the read path.
|
SELF |
enableDictionaryEncoding()
Enables dictionary encoding for the constructed writer.
|
SELF |
enableValidation()
Enables validation for the constructed writer.
|
protected abstract WriteSupport<T> |
getWriteSupport(org.apache.hadoop.conf.Configuration conf) |
protected abstract SELF |
self() |
SELF |
withCompressionCodec(org.apache.parquet.hadoop.metadata.CompressionCodecName codecName)
Set the
compression codec used by the
constructed writer. |
SELF |
withConf(org.apache.hadoop.conf.Configuration conf)
Set the
Configuration used by the constructed writer. |
SELF |
withDictionaryEncoding(boolean enableDictionary)
Enable or disable dictionary encoding for the constructed writer.
|
SELF |
withDictionaryPageSize(int dictionaryPageSize)
Set the Parquet format dictionary page size used by the constructed
writer.
|
SELF |
withMaxPaddingSize(int maxPaddingSize)
Set the maximum amount of padding, in bytes, that will be used to align
row groups with blocks in the underlying filesystem.
|
SELF |
withPageSize(int pageSize)
Set the Parquet format page size used by the constructed writer.
|
SELF |
withRowGroupSize(int rowGroupSize)
Set the Parquet format row group size used by the constructed writer.
|
SELF |
withValidation(boolean enableValidation)
Enable or disable validation for the constructed writer.
|
SELF |
withWriteMode(ParquetFileWriter.Mode mode)
Set the
write mode used when creating the
backing file for this writer. |
SELF |
withWriterVersion(ParquetProperties.WriterVersion version)
Set the
format version used by the constructed
writer. |
protected Builder(org.apache.hadoop.fs.Path path)
protected Builder(OutputFile path)
protected abstract SELF self()
protected abstract WriteSupport<T> getWriteSupport(org.apache.hadoop.conf.Configuration conf)
conf - a configurationpublic SELF withConf(org.apache.hadoop.conf.Configuration conf)
Configuration used by the constructed writer.conf - a Configurationpublic SELF withWriteMode(ParquetFileWriter.Mode mode)
write mode used when creating the
backing file for this writer.mode - a ParquetFileWriter.Modepublic SELF withCompressionCodec(org.apache.parquet.hadoop.metadata.CompressionCodecName codecName)
compression codec used by the
constructed writer.codecName - a CompressionCodecNamepublic SELF withRowGroupSize(int rowGroupSize)
rowGroupSize - an integer size in bytespublic SELF withPageSize(int pageSize)
pageSize - an integer size in bytespublic SELF withDictionaryPageSize(int dictionaryPageSize)
dictionaryPageSize - an integer size in bytespublic SELF withMaxPaddingSize(int maxPaddingSize)
maxPaddingSize - an integer size in bytespublic SELF enableDictionaryEncoding()
public SELF withDictionaryEncoding(boolean enableDictionary)
enableDictionary - whether dictionary encoding should be enabledpublic SELF enableValidation()
public SELF withValidation(boolean enableValidation)
enableValidation - whether validation should be enabledpublic SELF withWriterVersion(ParquetProperties.WriterVersion version)
format version used by the constructed
writer.version - a WriterVersionpublic SELF config(String property, String value)
property - a String property namevalue - a String property valuepublic ParquetWriter<T> build() throws IOException
ParquetWriter with the accumulated configuration.ParquetWriter instance.IOException - if there is an error while creating the writerCopyright © 2019 The Apache Software Foundation. All rights reserved.