Package com.jerolba.carpet
Class CarpetParquetWriter.Builder<T>
java.lang.Object
org.apache.parquet.hadoop.ParquetWriter.Builder<T,CarpetParquetWriter.Builder<T>>
com.jerolba.carpet.CarpetParquetWriter.Builder<T>
- Enclosing class:
- CarpetParquetWriter
public static class CarpetParquetWriter.Builder<T>
extends org.apache.parquet.hadoop.ParquetWriter.Builder<T,CarpetParquetWriter.Builder<T>>
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.parquet.hadoop.api.WriteSupport<T>protected org.apache.parquet.hadoop.api.WriteSupport<T>getWriteSupport(org.apache.hadoop.conf.Configuration conf) protected org.apache.parquet.hadoop.api.WriteSupport<T>getWriteSupport(org.apache.parquet.conf.ParquetConfiguration conf) protected CarpetParquetWriter.Builder<T>self()withColumnNamingStrategy(ColumnNamingStrategy columnNamingStrategy) Sets the strategy to use generating parquet message and record field names in the schemawithDefaultDecimal(int precision, int scale) Sets Decimal precision and scalewithDefaultTimeUnit(TimeUnit defaultTimeUnit) Sets the time unit resolution writing TIME or TIMESTAMP fields: milliseconds microseconds nanosecondswithExtraMetaData(String key, String value) Adds to writer metadata to include in the generated parquet file.withExtraMetaData(Map<String, String> extraMetaData) Adds to writer metadata to include in the generated parquet file.withLevelStructure(AnnotatedLevels annotatedLevels) Sets the type of collections type that will be generated following the LogicalTypes definition If not configured, 3-level structure is usedMethods inherited from class org.apache.parquet.hadoop.ParquetWriter.Builder
build, config, enableDictionaryEncoding, enablePageWriteChecksum, enableValidation, withAdaptiveBloomFilterEnabled, withAllocator, withBloomFilterCandidateNumber, withBloomFilterEnabled, withBloomFilterEnabled, withBloomFilterFPP, withBloomFilterNDV, withByteStreamSplitEncoding, withCodecFactory, withColumnIndexTruncateLength, withCompressionCodec, withConf, withConf, withDictionaryEncoding, withDictionaryEncoding, withDictionaryPageSize, withEncryption, withMaxBloomFilterBytes, withMaxPaddingSize, withMaxRowCountForPageSizeCheck, withMinRowCountForPageSizeCheck, withPageRowCountLimit, withPageSize, withPageWriteChecksumEnabled, withRowGroupSize, withRowGroupSize, withStatisticsTruncateLength, withValidation, withWriteMode, withWriterVersion
-
Method Details
-
withExtraMetaData
Adds to writer metadata to include in the generated parquet file.- Overrides:
withExtraMetaDatain classorg.apache.parquet.hadoop.ParquetWriter.Builder<T,CarpetParquetWriter.Builder<T>> - Parameters:
extraMetaData- to add- Returns:
- this builder for method chaining.
-
withExtraMetaData
Adds to writer metadata to include in the generated parquet file.- Parameters:
key- of the metadata to addvalue- of the metadata to add- Returns:
- this builder for method chaining.
-
self
- Specified by:
selfin classorg.apache.parquet.hadoop.ParquetWriter.Builder<T,CarpetParquetWriter.Builder<T>>
-
withLevelStructure
Sets the type of collections type that will be generated following the LogicalTypes definition If not configured, 3-level structure is used- Parameters:
annotatedLevels- an Enum configuring the number of levels- Returns:
- this builder for method chaining.
-
withColumnNamingStrategy
public CarpetParquetWriter.Builder<T> withColumnNamingStrategy(ColumnNamingStrategy columnNamingStrategy) Sets the strategy to use generating parquet message and record field names in the schema- Parameters:
columnNamingStrategy- an Enum configuring the strategy to use- Returns:
- this builder for method chaining.
-
withDefaultTimeUnit
Sets the time unit resolution writing TIME or TIMESTAMP fields:- milliseconds
- microseconds
- nanoseconds
- Parameters:
defaultTimeUnit- an Enum configuring the resolution to use- Returns:
- this builder for method chaining.
-
withDefaultDecimal
Sets Decimal precision and scale- Parameters:
precision- of the decimal numberscale- of the decimal number- Returns:
- this builder for method chaining.
-
getWriteSupport
protected org.apache.parquet.hadoop.api.WriteSupport<T> getWriteSupport(org.apache.parquet.conf.ParquetConfiguration conf) - Overrides:
getWriteSupportin classorg.apache.parquet.hadoop.ParquetWriter.Builder<T,CarpetParquetWriter.Builder<T>>
-
getWriteSupport
protected org.apache.parquet.hadoop.api.WriteSupport<T> getWriteSupport(org.apache.hadoop.conf.Configuration conf) - Specified by:
getWriteSupportin classorg.apache.parquet.hadoop.ParquetWriter.Builder<T,CarpetParquetWriter.Builder<T>>
-
getWriteSupport
-