Skip to content

Commit b0b869d

Browse files
committed
feat: add hmsDistribution to Spark matrix tests and update Cloudera compatibility
- Introduced `hmsDistribution` parameter in Gradle Spark matrix test tasks. - Updated task descriptions and configurations to ensure Cloudera Spark/Hadoop always uses Cloudera HMS. - Improved user guide to clarify HMS compatibility and task naming conventions.
1 parent f7f7e3b commit b0b869d

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

doc/user-guide.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,12 +904,12 @@ The aggregate task runs these cells:
904904

905905
|`sparkClouderaDepsApacheHmsTest`
906906
|Cloudera Spark/Hadoop
907-
|Open-source Hive 3 HMS
907+
|Cloudera HMS
908908
|No
909909

910910
|`sparkClouderaDepsApacheHmsKerberosTest`
911911
|Cloudera Spark/Hadoop
912-
|Open-source Hive 3 HMS
912+
|Cloudera HMS
913913
|Yes
914914

915915
|`sparkClouderaDepsClouderaHmsTest`
@@ -923,7 +923,9 @@ The aggregate task runs these cells:
923923
|Yes
924924
|===
925925

926-
The Kerberos axis currently enables the shared KDC and Kafka Kerberos path used by the Spark Kafka source. The HMS axis switches between the open-source Hive 3 HMS image and the Cloudera HMS image. The dependency axis switches the test JVM runtime classpath; it is intentionally implemented in Gradle rather than TOML.
926+
The Kerberos axis currently enables the shared KDC and Kafka Kerberos path used by the Spark Kafka source. The HMS axis switches between the open-source Hive 3 HMS image and the Cloudera HMS image for Apache Spark/Hadoop dependencies. Cloudera Spark/Hadoop dependencies always run with Cloudera HMS because that Hive client calls HMS Thrift APIs, such as `get_database_req`, that the open-source Hive 3.1.3 HMS server does not implement. The dependency axis switches the test JVM runtime classpath; it is intentionally implemented in Gradle rather than TOML.
927+
928+
`sparkClouderaDepsApacheHmsTest` and `sparkClouderaDepsApacheHmsKerberosTest` are compatibility task names only; both use Cloudera HMS.
927929

928930
Legacy HMS-only task aliases are still present:
929931

example/spark/build.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ fun registerSparkMatrixTest(
107107
name: String,
108108
descriptionText: String,
109109
dependencyLine: String,
110+
hmsDistribution: String,
110111
runtimeClasspath: Configuration,
111112
variantConfig: String,
112113
) = tasks.register<Test>(name) {
@@ -118,12 +119,14 @@ fun registerSparkMatrixTest(
118119
filter.includeTestsMatching(sparkBigDataTestClass)
119120
systemProperty("bigdata.test.config.replace", "true")
120121
systemProperty("bigdata.test.config", "$sparkCommonConfig,$variantConfig")
122+
systemProperty("bigdata.spark.hms.distribution", hmsDistribution)
121123
}
122124

123125
val sparkApacheDepsApacheHmsTest = registerSparkMatrixTest(
124126
name = "sparkApacheDepsApacheHmsTest",
125127
descriptionText = "Runs the Spark example with Apache Spark/Hadoop deps, open-source Hive 3 HMS, and plaintext Kafka.",
126128
dependencyLine = "apache",
129+
hmsDistribution = "apache",
127130
runtimeClasspath = apacheSparkRuntimeClasspath,
128131
variantConfig = "classpath:spark-bigdata-test-apache-hms.toml",
129132
)
@@ -132,6 +135,7 @@ val sparkApacheDepsApacheHmsKerberosTest = registerSparkMatrixTest(
132135
name = "sparkApacheDepsApacheHmsKerberosTest",
133136
descriptionText = "Runs the Spark example with Apache Spark/Hadoop deps, open-source Hive 3 HMS, and Kafka Kerberos.",
134137
dependencyLine = "apache",
138+
hmsDistribution = "apache",
135139
runtimeClasspath = apacheSparkRuntimeClasspath,
136140
variantConfig = "classpath:spark-bigdata-test-apache-hms-kerberos.toml",
137141
)
@@ -140,6 +144,7 @@ val sparkApacheDepsClouderaHmsTest = registerSparkMatrixTest(
140144
name = "sparkApacheDepsClouderaHmsTest",
141145
descriptionText = "Runs the Spark example with Apache Spark/Hadoop deps, Cloudera HMS, and plaintext Kafka.",
142146
dependencyLine = "apache",
147+
hmsDistribution = "cloudera",
143148
runtimeClasspath = apacheSparkRuntimeClasspath,
144149
variantConfig = "classpath:spark-bigdata-test-cloudera-hms.toml",
145150
)
@@ -148,30 +153,34 @@ val sparkApacheDepsClouderaHmsKerberosTest = registerSparkMatrixTest(
148153
name = "sparkApacheDepsClouderaHmsKerberosTest",
149154
descriptionText = "Runs the Spark example with Apache Spark/Hadoop deps, Cloudera HMS, and Kafka Kerberos.",
150155
dependencyLine = "apache",
156+
hmsDistribution = "cloudera",
151157
runtimeClasspath = apacheSparkRuntimeClasspath,
152158
variantConfig = "classpath:spark-bigdata-test-cloudera-hms-kerberos.toml",
153159
)
154160

155161
val sparkClouderaDepsApacheHmsTest = registerSparkMatrixTest(
156162
name = "sparkClouderaDepsApacheHmsTest",
157-
descriptionText = "Runs the Spark example with Cloudera Spark/Hadoop deps, open-source Hive 3 HMS, and plaintext Kafka.",
163+
descriptionText = "Compatibility task: Cloudera Spark/Hadoop deps always run with Cloudera HMS and plaintext Kafka.",
158164
dependencyLine = "cloudera",
165+
hmsDistribution = "cloudera",
159166
runtimeClasspath = clouderaSparkRuntimeClasspath,
160-
variantConfig = "classpath:spark-bigdata-test-apache-hms.toml",
167+
variantConfig = "classpath:spark-bigdata-test-cloudera-hms.toml",
161168
)
162169

163170
val sparkClouderaDepsApacheHmsKerberosTest = registerSparkMatrixTest(
164171
name = "sparkClouderaDepsApacheHmsKerberosTest",
165-
descriptionText = "Runs the Spark example with Cloudera Spark/Hadoop deps, open-source Hive 3 HMS, and Kafka Kerberos.",
172+
descriptionText = "Compatibility task: Cloudera Spark/Hadoop deps always run with Cloudera HMS and Kafka Kerberos.",
166173
dependencyLine = "cloudera",
174+
hmsDistribution = "cloudera",
167175
runtimeClasspath = clouderaSparkRuntimeClasspath,
168-
variantConfig = "classpath:spark-bigdata-test-apache-hms-kerberos.toml",
176+
variantConfig = "classpath:spark-bigdata-test-cloudera-hms-kerberos.toml",
169177
)
170178

171179
val sparkClouderaDepsClouderaHmsTest = registerSparkMatrixTest(
172180
name = "sparkClouderaDepsClouderaHmsTest",
173181
descriptionText = "Runs the Spark example with Cloudera Spark/Hadoop deps, Cloudera HMS, and plaintext Kafka.",
174182
dependencyLine = "cloudera",
183+
hmsDistribution = "cloudera",
175184
runtimeClasspath = clouderaSparkRuntimeClasspath,
176185
variantConfig = "classpath:spark-bigdata-test-cloudera-hms.toml",
177186
)
@@ -180,6 +189,7 @@ val sparkClouderaDepsClouderaHmsKerberosTest = registerSparkMatrixTest(
180189
name = "sparkClouderaDepsClouderaHmsKerberosTest",
181190
descriptionText = "Runs the Spark example with Cloudera Spark/Hadoop deps, Cloudera HMS, and Kafka Kerberos.",
182191
dependencyLine = "cloudera",
192+
hmsDistribution = "cloudera",
183193
runtimeClasspath = clouderaSparkRuntimeClasspath,
184194
variantConfig = "classpath:spark-bigdata-test-cloudera-hms-kerberos.toml",
185195
)

0 commit comments

Comments
 (0)