This is an automated email from the ASF dual-hosted git repository.
ahmedabualsaud pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new ebf80f326b2 download BQMS catalog jar at build time (#32282)
ebf80f326b2 is described below
commit ebf80f326b2f0c137b32372456170ad6b6c43e88
Author: Ahmed Abualsaud <[email protected]>
AuthorDate: Thu Aug 22 15:04:52 2024 -0400
download BQMS catalog jar at build time (#32282)
---
.../IO_Iceberg_Integration_Tests.json | 2 +-
.../iceberg-bigquery-catalog-1.5.2-0.1.0.jar | Bin 3598768 -> 0 bytes
.../java/io/iceberg/bigquerymetastore/build.gradle | 23 +++++++++++++++++++--
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/.github/trigger_files/IO_Iceberg_Integration_Tests.json
b/.github/trigger_files/IO_Iceberg_Integration_Tests.json
index a84f69a9772..5cf4f475f31 100644
--- a/.github/trigger_files/IO_Iceberg_Integration_Tests.json
+++ b/.github/trigger_files/IO_Iceberg_Integration_Tests.json
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to
run",
- "modification": 6
+ "modification": 7
}
diff --git
a/sdks/java/io/iceberg/bigquerymetastore/bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar
b/sdks/java/io/iceberg/bigquerymetastore/bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar
deleted file mode 100644
index 62f6e7e0a72..00000000000
Binary files
a/sdks/java/io/iceberg/bigquerymetastore/bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar
and /dev/null differ
diff --git a/sdks/java/io/iceberg/bigquerymetastore/build.gradle
b/sdks/java/io/iceberg/bigquerymetastore/build.gradle
index 582966b65f1..20e4a33b09f 100644
--- a/sdks/java/io/iceberg/bigquerymetastore/build.gradle
+++ b/sdks/java/io/iceberg/bigquerymetastore/build.gradle
@@ -19,19 +19,38 @@ plugins {
id 'org.apache.beam.module'
}
+def bqmsLocation = "$buildDir/libs"
+
applyJavaNature(
automaticModuleName: 'org.apache.beam.sdk.io.iceberg.bqms',
shadowClosure: {
dependencies {
-
include(dependency(files("bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")))
+
include(dependency(files("$bqmsLocation/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")))
}
relocate 'com.google.guava',
getJavaRelocatedPath('iceberg.bqms.com.google.guava')
},
+ validateShadowJar: false
)
description = "Apache Beam :: SDKs :: Java :: IO :: Iceberg :: BigQuery
Metastore"
ext.summary = "A copy of the BQMS catalog with some popular libraries
relocated."
+task downloadBqmsJar(type: Copy) {
+ def jarUrl =
'https://storage.googleapis.com/spark-lib/bigquery/iceberg-bigquery-catalog-1.5.2-0.1.0.jar'
+ def outputDir = file("$bqmsLocation")
+ outputDir.mkdirs()
+
+ ant.get(src: jarUrl, dest: outputDir)
+}
+
+repositories {
+ flatDir {
+ dirs "$bqmsLocation"
+ }
+}
+
+compileJava.dependsOn downloadBqmsJar
+
dependencies {
- implementation
files("bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")
+ implementation
files("$bqmsLocation/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")
}