| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | String sparkMajorVersion = '3.4' |
| | String scalaVersion = System.getProperty("scalaVersion") != null ? System.getProperty("scalaVersion") : System.getProperty("defaultScalaVersion") |
| |
|
| | def sparkProjects = [ |
| | project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}"), |
| | project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}"), |
| | project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersion}"), |
| | ] |
| |
|
| | configure(sparkProjects) { |
| | configurations { |
| | all { |
| | resolutionStrategy { |
| | force "com.fasterxml.jackson.module:jackson-module-scala_${scalaVersion}:${libs.versions.jackson214.get()}" |
| | force "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson214.get()}" |
| | force "com.fasterxml.jackson.core:jackson-core:${libs.versions.jackson214.get()}" |
| | } |
| | } |
| | } |
| | } |
| |
|
| | project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") { |
| | apply plugin: 'scala' |
| | apply plugin: 'com.github.alisiikh.scalastyle' |
| |
|
| | sourceSets { |
| | main { |
| | scala.srcDirs = ['src/main/scala', 'src/main/java'] |
| | java.srcDirs = [] |
| | } |
| | } |
| |
|
| | dependencies { |
| | implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') |
| | api project(':iceberg-api') |
| | implementation project(':iceberg-common') |
| | implementation project(':iceberg-core') |
| | implementation project(':iceberg-data') |
| | implementation project(':iceberg-orc') |
| | implementation project(':iceberg-parquet') |
| | implementation project(':iceberg-arrow') |
| | implementation("org.scala-lang.modules:scala-collection-compat_${scalaVersion}:${libs.versions.scala.collection.compat.get()}") |
| |
|
| | compileOnly libs.errorprone.annotations |
| | compileOnly libs.avro.avro |
| | compileOnly("org.apache.spark:spark-hive_${scalaVersion}:${libs.versions.spark.hive34.get()}") { |
| | exclude group: 'org.apache.avro', module: 'avro' |
| | exclude group: 'org.apache.arrow' |
| | exclude group: 'org.apache.parquet' |
| | |
| | exclude group: 'io.netty', module: 'netty-buffer' |
| | exclude group: 'io.netty', module: 'netty-common' |
| | exclude group: 'org.roaringbitmap' |
| | } |
| |
|
| | implementation libs.parquet.column |
| | implementation libs.parquet.hadoop |
| |
|
| | implementation("${libs.orc.core.get().module}:${libs.versions.orc.get()}:nohive") { |
| | exclude group: 'org.apache.hadoop' |
| | exclude group: 'commons-lang' |
| | |
| | exclude group: 'com.google.protobuf', module: 'protobuf-java' |
| | exclude group: 'org.apache.hive', module: 'hive-storage-api' |
| | } |
| |
|
| | implementation(libs.arrow.vector) { |
| | exclude group: 'io.netty', module: 'netty-buffer' |
| | exclude group: 'io.netty', module: 'netty-common' |
| | exclude group: 'com.google.code.findbugs', module: 'jsr305' |
| | } |
| |
|
| | implementation libs.caffeine |
| |
|
| | testImplementation(libs.hadoop2.minicluster) { |
| | exclude group: 'org.apache.avro', module: 'avro' |
| | |
| | exclude group: 'io.netty', module: 'netty-buffer' |
| | exclude group: 'io.netty', module: 'netty-common' |
| | } |
| | testImplementation project(path: ':iceberg-hive-metastore') |
| | testImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') |
| | testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') |
| | testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') |
| | testImplementation project(path: ':iceberg-data', configuration: 'testArtifacts') |
| | testImplementation libs.sqlite.jdbc |
| | testImplementation libs.awaitility |
| | } |
| |
|
| | test { |
| | useJUnitPlatform() |
| | } |
| |
|
| | tasks.withType(Test) { |
| | |
| | maxHeapSize '2560m' |
| | } |
| | } |
| |
|
| | project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}") { |
| | apply plugin: 'java-library' |
| | apply plugin: 'scala' |
| | apply plugin: 'com.github.alisiikh.scalastyle' |
| | apply plugin: 'antlr' |
| |
|
| | configurations { |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | implementation { |
| | extendsFrom = extendsFrom.findAll { it != configurations.antlr } |
| | } |
| | } |
| |
|
| | dependencies { |
| | implementation("org.scala-lang.modules:scala-collection-compat_${scalaVersion}:${libs.versions.scala.collection.compat.get()}") |
| | implementation libs.roaringbitmap |
| |
|
| | compileOnly "org.scala-lang:scala-library" |
| | compileOnly project(path: ':iceberg-bundled-guava', configuration: 'shadow') |
| | compileOnly project(':iceberg-api') |
| | compileOnly project(':iceberg-core') |
| | compileOnly project(':iceberg-common') |
| | compileOnly project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") |
| | compileOnly("org.apache.spark:spark-hive_${scalaVersion}:${libs.versions.spark.hive34.get()}") { |
| | exclude group: 'org.apache.avro', module: 'avro' |
| | exclude group: 'org.apache.arrow' |
| | exclude group: 'org.apache.parquet' |
| | |
| | exclude group: 'io.netty', module: 'netty-buffer' |
| | exclude group: 'io.netty', module: 'netty-common' |
| | exclude group: 'org.roaringbitmap' |
| | } |
| | compileOnly libs.errorprone.annotations |
| |
|
| | testImplementation project(path: ':iceberg-data') |
| | testImplementation project(path: ':iceberg-parquet') |
| | testImplementation project(path: ':iceberg-hive-metastore') |
| | testImplementation project(path: ':iceberg-data', configuration: 'testArtifacts') |
| | testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') |
| | testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') |
| | testImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') |
| | testImplementation project(path: ":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}", configuration: 'testArtifacts') |
| |
|
| | testImplementation libs.avro.avro |
| | testImplementation libs.parquet.hadoop |
| |
|
| | |
| | runtimeOnly libs.antlr.runtime |
| | antlr libs.antlr.antlr4 |
| | } |
| |
|
| | generateGrammarSource { |
| | maxHeapSize = "64m" |
| | arguments += ['-visitor', '-package', 'org.apache.spark.sql.catalyst.parser.extensions'] |
| | } |
| | } |
| |
|
| | project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersion}") { |
| | apply plugin: 'com.github.johnrengelman.shadow' |
| |
|
| | tasks.jar.dependsOn tasks.shadowJar |
| |
|
| | sourceSets { |
| | integration { |
| | java.srcDir "$projectDir/src/integration/java" |
| | resources.srcDir "$projectDir/src/integration/resources" |
| | } |
| | } |
| |
|
| | configurations { |
| | implementation { |
| | exclude group: 'org.apache.spark' |
| | |
| | exclude group: 'org.slf4j' |
| | exclude group: 'org.apache.commons' |
| | exclude group: 'commons-pool' |
| | exclude group: 'commons-codec' |
| | exclude group: 'org.xerial.snappy' |
| | exclude group: 'javax.xml.bind' |
| | exclude group: 'javax.annotation' |
| | exclude group: 'com.github.luben' |
| | exclude group: 'com.ibm.icu' |
| | exclude group: 'org.glassfish' |
| | exclude group: 'org.abego.treelayout' |
| | exclude group: 'org.antlr' |
| | exclude group: 'org.scala-lang' |
| | exclude group: 'org.scala-lang.modules' |
| | } |
| | } |
| |
|
| | dependencies { |
| | api project(':iceberg-api') |
| | implementation project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") |
| | implementation project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}") |
| | implementation project(':iceberg-aws') |
| | implementation project(':iceberg-azure') |
| | implementation(project(':iceberg-aliyun')) { |
| | exclude group: 'edu.umd.cs.findbugs', module: 'findbugs' |
| | exclude group: 'org.apache.httpcomponents', module: 'httpclient' |
| | exclude group: 'commons-logging', module: 'commons-logging' |
| | } |
| | implementation project(':iceberg-gcp') |
| | implementation project(':iceberg-hive-metastore') |
| | implementation(project(':iceberg-nessie')) { |
| | exclude group: 'com.google.code.findbugs', module: 'jsr305' |
| | } |
| | implementation (project(':iceberg-snowflake')) { |
| | exclude group: 'net.snowflake' , module: 'snowflake-jdbc' |
| | } |
| |
|
| | integrationImplementation "org.scala-lang.modules:scala-collection-compat_${scalaVersion}:${libs.versions.scala.collection.compat.get()}" |
| | integrationImplementation "org.apache.spark:spark-hive_${scalaVersion}:${libs.versions.spark.hive34.get()}" |
| | integrationImplementation libs.junit.vintage.engine |
| | integrationImplementation libs.slf4j.simple |
| | integrationImplementation libs.assertj.core |
| | integrationImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') |
| | integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') |
| | integrationImplementation project(path: ":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}", configuration: 'testArtifacts') |
| | integrationImplementation project(path: ":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}", configuration: 'testArtifacts') |
| | |
| | integrationCompileOnly project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}") |
| | integrationCompileOnly project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") |
| | integrationCompileOnly project(':iceberg-api') |
| | } |
| |
|
| | shadowJar { |
| | configurations = [project.configurations.runtimeClasspath] |
| |
|
| | zip64 true |
| |
|
| | |
| | from(projectDir) { |
| | include 'LICENSE' |
| | include 'NOTICE' |
| | } |
| |
|
| | |
| | relocate 'com.google.errorprone', 'org.apache.iceberg.shaded.com.google.errorprone' |
| | relocate 'com.google.flatbuffers', 'org.apache.iceberg.shaded.com.google.flatbuffers' |
| | relocate 'com.fasterxml', 'org.apache.iceberg.shaded.com.fasterxml' |
| | relocate 'com.github.benmanes', 'org.apache.iceberg.shaded.com.github.benmanes' |
| | relocate 'org.checkerframework', 'org.apache.iceberg.shaded.org.checkerframework' |
| | relocate 'org.apache.avro', 'org.apache.iceberg.shaded.org.apache.avro' |
| | relocate 'avro.shaded', 'org.apache.iceberg.shaded.org.apache.avro.shaded' |
| | relocate 'com.thoughtworks.paranamer', 'org.apache.iceberg.shaded.com.thoughtworks.paranamer' |
| | relocate 'org.apache.parquet', 'org.apache.iceberg.shaded.org.apache.parquet' |
| | relocate 'shaded.parquet', 'org.apache.iceberg.shaded.org.apache.parquet.shaded' |
| | relocate 'org.apache.orc', 'org.apache.iceberg.shaded.org.apache.orc' |
| | relocate 'io.airlift', 'org.apache.iceberg.shaded.io.airlift' |
| | relocate 'org.apache.hc.client5', 'org.apache.iceberg.shaded.org.apache.hc.client5' |
| | relocate 'org.apache.hc.core5', 'org.apache.iceberg.shaded.org.apache.hc.core5' |
| | |
| | relocate 'io.netty', 'org.apache.iceberg.shaded.io.netty' |
| | relocate 'org.apache.arrow', 'org.apache.iceberg.shaded.org.apache.arrow' |
| | relocate 'com.carrotsearch', 'org.apache.iceberg.shaded.com.carrotsearch' |
| | relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra' |
| | relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap' |
| |
|
| | archiveClassifier.set(null) |
| | } |
| |
|
| | task integrationTest(type: Test) { |
| | description = "Test Spark3 Runtime Jar against Spark ${sparkMajorVersion}" |
| | group = "verification" |
| | jvmArgs += project.property('extraJvmArgs') |
| | testClassesDirs = sourceSets.integration.output.classesDirs |
| | classpath = sourceSets.integration.runtimeClasspath + files(shadowJar.archiveFile.get().asFile.path) |
| | inputs.file(shadowJar.archiveFile.get().asFile.path) |
| | } |
| | integrationTest.dependsOn shadowJar |
| | check.dependsOn integrationTest |
| |
|
| | jar { |
| | enabled = false |
| | } |
| | } |
| |
|
| |
|