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 |
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 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 thresholdIOException
ParquetWriter(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 schemaIOException
ParquetWriter(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.WriterVersion
IOException
#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.WriterVersion
conf
- 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.WriterVersion
conf
- 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
IOException
public void write(T object) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public long getDataSize()
Copyright © 2015 The Apache Software Foundation. All rights reserved.