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 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,
CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating,
ParquetProperties.WriterVersion writerVersion,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
CompressionCodecName compressionCodecName,
int blockSize,
int pageSize)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
boolean enableDictionary,
boolean validating)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating,
ParquetProperties.WriterVersion writerVersion)
Deprecated.
|
ParquetWriter(org.apache.hadoop.fs.Path file,
WriteSupport<T> writeSupport,
CompressionCodecName compressionCodecName,
int blockSize,
int pageSize,
int dictionaryPageSize,
boolean enableDictionary,
boolean validating,
ParquetProperties.WriterVersion writerVersion,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
|
public static final int DEFAULT_BLOCK_SIZE
public static final int DEFAULT_PAGE_SIZE
public static final 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, 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 thresholdIOExceptionParquetWriter(Path, WriteSupport, CompressionCodecName, int, int, boolean, boolean)@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, 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 schemaIOExceptionParquetWriter(Path, WriteSupport, CompressionCodecName, int, int, int, boolean, boolean)@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, 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#ParquetWriter(Path, WriteSupport, CompressionCodecName, int, int, int, boolean, boolean, WriterVersion)@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, 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#ParquetWriter(Path, WriteSupport, CompressionCodecName, int, int, int, boolean, boolean, WriterVersion, Configuration)@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, WriteSupport<T> writeSupport, 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@Deprecated public ParquetWriter(org.apache.hadoop.fs.Path file, ParquetFileWriter.Mode mode, WriteSupport<T> writeSupport, 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@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@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 long getDataSize()
Copyright © 2018 The Apache Software Foundation. All rights reserved.