Skip to content

Commit 7e522fb

Browse files
committed
feat: add openlineage to spark image
1 parent 2fa8045 commit 7e522fb

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file.
2424
- druid: Add `37.0.0` ([#1535]).
2525
- hbase: Add `2.6.6` ([#1547]).
2626
- spark: Add `4.1.2` ([#1550]).
27+
- spark: Bake the OpenLineage Spark listener (`openlineage-spark_2.13` `1.51.0`) into the `4.1.x` images under the dedicated directory `/stackable/spark/openlineage/` (off the `extra-jars` classpath), enabling the OpenLineage MVP in the operator ([#XXXX]).
2728
- opensearch: Add `3.6.0` ([#1549]).
2829
- opensearch-dashboards: Add `3.6.0` ([#1551]).
2930

@@ -95,6 +96,7 @@ All notable changes to this project will be documented in this file.
9596
[#1548]: https://github.com/stackabletech/docker-images/pull/1548
9697
[#1549]: https://github.com/stackabletech/docker-images/pull/1549
9798
[#1550]: https://github.com/stackabletech/docker-images/pull/1550
99+
[#XXXX]: https://github.com/stackabletech/docker-images/pull/XXXX
98100
[#1551]: https://github.com/stackabletech/docker-images/pull/1551
99101
[#1559]: https://github.com/stackabletech/docker-images/pull/1559
100102
[#1561]: https://github.com/stackabletech/docker-images/pull/1561

spark-k8s/Dockerfile.4

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ENV HADOOP_VERSION=${HADOOP_HADOOP_VERSION}
3939
ARG JACKSON_DATAFORMAT_XML_VERSION
4040
ARG STAX2_API_VERSION
4141
ARG WOODSTOX_CORE_VERSION
42+
ARG OPENLINEAGE_SPARK_VERSION
4243
ARG JMX_EXPORTER_VERSION
4344
ARG TARGETARCH
4445
ARG TINI_VERSION
@@ -122,6 +123,16 @@ mvn dependency:get -Dartifact=mvn dependency:get -Dartifact=com.fasterxml.woodst
122123
cp /root/.m2/repository/com/fasterxml/woodstox/woodstox-core/${WOODSTOX_CORE_VERSION}/woodstox-core-${WOODSTOX_CORE_VERSION}.jar \
123124
/stackable/spark-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/dist/extra-jars/woodstox-core-${WOODSTOX_CORE_VERSION}.jar
124125

126+
# Download the OpenLineage Spark listener jar into a DEDICATED directory (dist/openlineage),
127+
# NOT dist/extra-jars. The operator references it via `--jars local:///stackable/spark/openlineage/...`
128+
# so it loads on Spark's child/user classloader, sharing it with connectors delivered via `--packages`
129+
# (e.g. Iceberg). If it landed on extra-jars it would be added to the system classloader via
130+
# extraClassPath, OpenLineage's connector probe would fail, and no datasets would be emitted.
131+
mkdir -p /stackable/spark-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/dist/openlineage
132+
mvn dependency:get -Dartifact=io.openlineage:openlineage-spark_2.13:${OPENLINEAGE_SPARK_VERSION}
133+
cp /root/.m2/repository/io/openlineage/openlineage-spark_2.13/${OPENLINEAGE_SPARK_VERSION}/openlineage-spark_2.13-${OPENLINEAGE_SPARK_VERSION}.jar \
134+
/stackable/spark-${PRODUCT_VERSION}-stackable${RELEASE_VERSION}/dist/openlineage/openlineage-spark_2.13-${OPENLINEAGE_SPARK_VERSION}.jar
135+
125136
# Get the correct `tini` binary for our architecture.
126137
curl --fail "https://repo.stackable.tech/repository/packages/tini/tini-${TINI_VERSION}-${TARGETARCH}" \
127138
-o /usr/bin/tini

spark-k8s/boil-config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ stax2-api-version = "4.2.2" # Needs to match https://mvnrepository
3737
woodstox-core-version = "7.1.1" # Needs to match https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.20.0
3838
jmx-exporter-version = "1.3.0"
3939
tini-version = "0.19.0"
40+
openlineage-spark-version = "1.51.0" # Scala 2.13 build for Spark 4.1.x; see https://mvnrepository.com/artifact/io.openlineage/openlineage-spark_2.13
4041

4142
# LTS since 26.7.0
4243
[versions."4.1.2"]
@@ -54,3 +55,4 @@ stax2-api-version = "4.2.2" # Needs to match https://mvnrepository
5455
woodstox-core-version = "7.1.1" # Needs to match https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.21.2
5556
jmx-exporter-version = "1.3.0"
5657
tini-version = "0.19.0"
58+
openlineage-spark-version = "1.51.0" # Scala 2.13 build for Spark 4.1.x; see https://mvnrepository.com/artifact/io.openlineage/openlineage-spark_2.13

0 commit comments

Comments
 (0)