Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ lib/
site/site

# benchmark output
spark2/benchmark/*
!spark2/benchmark/.gitkeep
spark3/benchmark/*
!spark3/benchmark/.gitkeep
spark/2_4/core/benchmark/*
!spark/2_4/core/benchmark/.gitkeep
spark/3_0/core/benchmark/*
!spark/3_0/core/benchmark/.gitkeep

__pycache__/
*.py[cod]
Expand Down
481 changes: 199 additions & 282 deletions build.gradle

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions jmh.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

def jmhProjects = []
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
jmhProjects = [ project("iceberg-spark2"), project("iceberg-spark3") ]
jmhProjects = [ project("iceberg-spark") ]
} else if (JavaVersion.current() == JavaVersion.VERSION_11) {
jmhProjects = [ project("iceberg-spark3") ]
jmhProjects = [ project("iceberg-spark") ]
} else {
throw new GradleException("The JMH benchamrks must be run with JDK 8 or JDK 11")
}
Expand Down
36 changes: 24 additions & 12 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ include 'orc'
include 'arrow'
include 'parquet'
include 'bundled-guava'
include 'spark'
include 'spark3'
include 'spark3-extensions'
include 'spark3-runtime'
include 'pig'
include 'hive-metastore'
include 'nessie'
Expand All @@ -54,22 +50,38 @@ project(':orc').name = 'iceberg-orc'
project(':arrow').name = 'iceberg-arrow'
project(':parquet').name = 'iceberg-parquet'
project(':bundled-guava').name = 'iceberg-bundled-guava'
project(':spark').name = 'iceberg-spark'
project(':spark3').name = 'iceberg-spark3'
project(':spark3-extensions').name = 'iceberg-spark3-extensions'
project(':spark3-runtime').name = 'iceberg-spark3-runtime'
project(':pig').name = 'iceberg-pig'
project(':hive-metastore').name = 'iceberg-hive-metastore'
project(':nessie').name = 'iceberg-nessie'

// spark
include 'spark-common'
include 'spark'
include 'spark-extensions'
include 'spark-runtime'

var SparkSrcVersion = System.getProperty("sparkSrc") != null ? System.getProperty("sparkSrc") : '3_0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically we don't have to expose this to users, and we can have a map of all build versions supported by a source version. But I am not sure yet which way is better.


if (SparkSrcVersion == '2_4' && JavaVersion.current() != JavaVersion.VERSION_1_8) {
throw new Exception("Expected java8 to build Spark 2.4, but got ${SparkSrcVersion}")
}

project(':spark-common').name = 'iceberg-spark-common'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this to common to make spark the main directory containing all versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The common package should contain only code compilable across all versions. Then for every backwards incompatible version, we create a new source version directory, which will build against Spark versions until it becomes incompatible. So for example here, source version 3_0 is built against both 3.0.3 and 3.1.1. When we introduce 3_2, it will build against 3.2.x, and maybe even 3.3.x.

project(':spark').projectDir = file("spark/${SparkSrcVersion}/core")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically we want the name to be something like spark_3_0, which should match the jar we will publish in maven. But not sure if we should also include scala version here.

project(':spark').name = 'iceberg-spark'

if (SparkSrcVersion != '2_4') {
project(':spark-extensions').projectDir = file("spark/${SparkSrcVersion}/extensions")
project(':spark-extensions').name = 'iceberg-spark-extensions'
}

project(':spark-runtime').projectDir = file("spark/${SparkSrcVersion}/runtime")
project(':spark-runtime').name = 'iceberg-spark-runtime'

if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
include 'spark2'
include 'spark-runtime'
include 'hive3'
include 'hive3-orc-bundle'

project(':spark2').name = 'iceberg-spark2'
project(':spark-runtime').name = 'iceberg-spark-runtime'
project(':hive3').name = 'iceberg-hive3'
project(':hive3-orc-bundle').name = 'iceberg-hive3-orc-bundle'
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading