(parquet) Use ZSTD compression by default.

This commit is contained in:
Viktor Lofgren 2023-09-11 09:02:58 +02:00
parent a284682deb
commit dbe974f510
3 changed files with 10 additions and 4 deletions

View File

@ -116,6 +116,7 @@ dependencyResolutionManagement {
library('spark', 'com.sparkjava', 'spark-core').version('2.9.4')
library('guice', 'com.google.inject', 'guice').version('7.0.0')
library('guava', 'com.google.guava', 'guava').version('32.0.1-jre')
library('protobuf', 'com.google.protobuf', 'protobuf-java').version('3.0.0')
library('rxjava', 'io.reactivex.rxjava3', 'rxjava').version('3.1.6')
@ -160,7 +161,6 @@ dependencyResolutionManagement {
library('opencsv','com.opencsv','opencsv').version('5.6')
library('bucket4j','com.github.vladimir-bukhtoyarov','bucket4j-core').version('7.5.0')
library('protobuf','com.google.protobuf','protobuf-java').version('3.0.0')
library('gson','com.google.code.gson','gson').version('2.10.1')
library('gson-type-adapter','com.github.Marcono1234','gson-record-type-adapter-factory').version('0.2.0')
@ -182,6 +182,9 @@ dependencyResolutionManagement {
library('sqlite','org.xerial','sqlite-jdbc').version('3.41.2.1')
library('parquet-column', 'org.apache.parquet','parquet-column').version('1.13.1')
library('parquet-hadoop', 'org.apache.parquet','parquet-hadoop').version('1.13.1')
bundle('slf4j', ['slf4j.api', 'log4j.api', 'log4j.core', 'log4j.slf4j'])
bundle('slf4j.test', ['slf4j.jdk14'])
bundle('prometheus', ['prometheus', 'prometheus-servlet', 'prometheus-server', 'prometheus-hotspot'])
@ -192,7 +195,7 @@ dependencyResolutionManagement {
bundle('gson', ['gson', 'gson-type-adapter'])
bundle('httpcomponents', ['httpcomponents.core', 'httpcomponents.client'])
bundle('parquet', ['parquet-column', 'parquet-hadoop'])
bundle('junit', ['junit.jupiter', 'junit.jupiter.engine'])
}

View File

@ -9,9 +9,12 @@ java {
}
dependencies {
implementation 'org.apache.parquet:parquet-column:1.13.1'
implementation ('org.apache.parquet:parquet-column:1.13.1') {
transitive = true
}
implementation('org.apache.parquet:parquet-hadoop:1.13.1') {
exclude group: 'commons-pool', module: 'commons-pool'
transitive = true
}
}

View File

@ -62,7 +62,7 @@ public final class ParquetWriter<T> implements Closeable {
this.writer = new Builder<T>(outputFile)
.withType(schema)
.withDehydrator(dehydrator)
.withCompressionCodec(CompressionCodecName.SNAPPY)
.withCompressionCodec(CompressionCodecName.ZSTD)
.withWriterVersion(ParquetProperties.WriterVersion.PARQUET_2_0)
.build();
}