public class ParquetWriter<T> extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
ParquetWriter.Builder<T,SELF extends ParquetWriter.Builder<T,SELF>>
An abstract builder class for ParquetWriter instances.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BLOCK_SIZE |
static org.apache.parquet.hadoop.metadata.CompressionCodecName |
DEFAULT_COMPRESSION_CODEC_NAME |
static boolean |
DEFAULT_IS_DICTIONARY_ENABLED |
static boolean |
DEFAULT_IS_VALIDATING_ENABLED |
static int |
DEFAULT_PAGE_SIZE |
static ParquetProperties.WriterVersion |
DEFAULT_WRITER_VERSION |
static int |
MAX_PADDING_SIZE_DEFAULT |
static String |
OBJECT_MODEL_NAME_PROP |
| Constructor and Description |
|---|
ParquetWriter(org.apache.hadoop.fs.Path file,
org.apache.hadoop.conf.Configuration conf,
WriteSupport<T> writeSupport)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
ParquetFileWriter.Mode mode,
WriteSupport<T> writeSupport,
org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating,
ParquetProperties.WriterVersion writerVersion,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
will be removed in 2.0.0
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport)
Deprecated.
will be removed in 2.0.0
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName,
int blockSize,
int pageSize)
Deprecated.
will be removed in 2.0.0
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
boolean enableDictionary,
boolean validating)
Deprecated.
will be removed in 2.0.0
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating)
Deprecated.
will be removed in 2.0.0
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating,
ParquetProperties.WriterVersion writerVersion)
Deprecated.
will be removed in 2.0.0
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating,
ParquetProperties.WriterVersion writerVersion,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
will be removed in 2.0.0
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getDataSize() |
ParquetMetadata |
getFooter() |
void |
write(T object) |
public static final int DEFAULT_BLOCK_SIZE
public static final int DEFAULT_PAGE_SIZE
public static final org.apache.parquet.hadoop.metadata.CompressionCodecName DEFAULT_COMPRESSION_CODEC_NAME
public static final boolean DEFAULT_IS_DICTIONARY_ENABLED
public static final boolean DEFAULT_IS_VALIDATING_ENABLED
public static final ParquetProperties.WriterVersion DEFAULT_WRITER_VERSION
public static final String OBJECT_MODEL_NAME_PROP
public static final int MAX_PADDING_SIZE_DEFAULT
@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName, int blockSize, int pageSize) throws IOException
file - the file to createwriteSupport - the implementation to write a record to a RecordConsumercompressionCodecName - the compression codec to useblockSize - the block size thresholdpageSize - the page size thresholdIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName, int blockSize, int pageSize, boolean enableDictionary, boolean validating) throws IOException
file - the file to createwriteSupport - the implementation to write a record to a RecordConsumercompressionCodecName - the compression codec to useblockSize - the block size thresholdpageSize - the page size threshold (both data and dictionary)enableDictionary - to turn dictionary encoding onvalidating - to turn on validation using the schemaIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName, int blockSize, int pageSize, int dictionaryPageSize, boolean enableDictionary, boolean validating) throws IOException
file - the file to createwriteSupport - the implementation to write a record to a RecordConsumercompressionCodecName - the compression codec to useblockSize - the block size thresholdpageSize - the page size thresholddictionaryPageSize - the page size threshold for the dictionary pagesenableDictionary - to turn dictionary encoding onvalidating - to turn on validation using the schemaIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName, int blockSize, int pageSize, int dictionaryPageSize, boolean enableDictionary, boolean validating, ParquetProperties.WriterVersion writerVersion) throws IOException
Configuration which reads
configuration from the classpath.file - the file to createwriteSupport - the implementation to write a record to a RecordConsumercompressionCodecName - the compression codec to useblockSize - the block size thresholdpageSize - the page size thresholddictionaryPageSize - the page size threshold for the dictionary pagesenableDictionary - to turn dictionary encoding onvalidating - to turn on validation using the schemawriterVersion - version of parquetWriter from ParquetProperties.WriterVersionIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName, int blockSize, int pageSize, int dictionaryPageSize, boolean enableDictionary, boolean validating, ParquetProperties.WriterVersion writerVersion, org.apache.hadoop.conf.Configuration conf) throws IOException
file - the file to createwriteSupport - the implementation to write a record to a RecordConsumercompressionCodecName - the compression codec to useblockSize - the block size thresholdpageSize - the page size thresholddictionaryPageSize - the page size threshold for the dictionary pagesenableDictionary - to turn dictionary encoding onvalidating - to turn on validation using the schemawriterVersion - version of parquetWriter from ParquetProperties.WriterVersionconf - Hadoop configuration to use while accessing the filesystemIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, ParquetFileWriter.Mode mode, WriteSupport<T> writeSupport, org.apache.parquet.hadoop.metadata.CompressionCodecName compressionCodecName, int blockSize, int pageSize, int dictionaryPageSize, boolean enableDictionary, boolean validating, ParquetProperties.WriterVersion writerVersion, org.apache.hadoop.conf.Configuration conf) throws IOException
file - the file to createmode - file creation modewriteSupport - the implementation to write a record to a RecordConsumercompressionCodecName - the compression codec to useblockSize - the block size thresholdpageSize - the page size thresholddictionaryPageSize - the page size threshold for the dictionary pagesenableDictionary - to turn dictionary encoding onvalidating - to turn on validation using the schemawriterVersion - version of parquetWriter from ParquetProperties.WriterVersionconf - Hadoop configuration to use while accessing the filesystemIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport) throws IOException
file - the file to createwriteSupport - the implementation to write a record to a RecordConsumerIOException - if there is an error while writing@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, org.apache.hadoop.conf.Configuration conf, WriteSupport<T> writeSupport) throws IOException
IOExceptionpublic void write(T object) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic ParquetMetadata getFooter()
public long getDataSize()
Copyright © 2019 The Apache Software Foundation. All rights reserved.