Skip to content

Commit 7bef068

Browse files
authored
[PUBDEV-8985] Fix CDH 6.1 kerberos tests (h2oai#15591)
1 parent 1619acd commit 7bef068

File tree

4 files changed

+51
-47
lines changed

4 files changed

+51
-47
lines changed

h2o-hadoop-2/assemblyjar.gradle

+7-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sourceCompatibility = 1.8
77
targetCompatibility = 1.8
88

99
ext {
10-
parquetVersion = "1.8.1"
10+
defaultParquetVersion = "1.8.1"
1111
}
1212

1313
def hasCustomHdfsDep = ext.has("hdfsDependency") && (ext.get("hdfsDependency") != defaultHdfsDependency)
@@ -56,10 +56,7 @@ dependencies {
5656
api(project(":h2o-ext-krbstandalone")) {
5757
transitive = false // we just need hadoop-auth which is provided by the hadoop-client dependency
5858
}
59-
api("org.apache.parquet:parquet-avro:${parquetVersion}") // required by h2o-hive
60-
api("org.apache.parquet:parquet-hadoop:${parquetVersion}") { // required by h2o-parquet-parser
61-
force = true
62-
}
59+
api("org.apache.parquet:parquet-avro:${defaultParquetVersion}") // required by h2o-hive
6360

6461
// For standalone mode to work with MapR, this extra library needs to be
6562
// included, and it's not pulled in by the dependency stuff; this must
@@ -78,9 +75,13 @@ dependencies {
7875
transitive = false
7976
}
8077
}
81-
api(project(":h2o-parquet-parser"))
78+
api(project(":h2o-parquet-parser")) {
79+
transitive = false
80+
}
8281
}
8382

83+
apply from: "${rootDir}/h2o-parsers/h2o-parquet-parser/parquet_dependencies.gradle"
84+
8485
//
8586
// Bundle optional modules
8687
// The process is defined by convention. There are two flags:

h2o-hadoop-3/assemblyjar_common.gradle

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ext {
2-
parquetVersion = "1.8.1"
2+
defaultParquetVersion = "1.8.1"
33
}
44

55
dependencies {
@@ -19,11 +19,7 @@ dependencies {
1919
api(project(":h2o-ext-krbstandalone")) {
2020
transitive = false // we just need hadoop-auth which is provided by the hadoop-client dependency
2121
}
22-
api("org.apache.parquet:parquet-avro:${parquetVersion}") // required by h2o-hive
23-
api("org.apache.parquet:parquet-hadoop:${parquetVersion}") { // required by h2o-parquet-parser
24-
force = true
25-
}
26-
22+
api("org.apache.parquet:parquet-avro:${defaultParquetVersion}") // required by h2o-hive
2723
// For standalone mode to work with MapR, this extra library needs to be
2824
// included, and it's not pulled in by the dependency stuff; this must
2925
// be a bug in MapR's packaging process.
@@ -41,9 +37,14 @@ dependencies {
4137
transitive = false
4238
}
4339
}
44-
api(project(":h2o-parquet-parser"))
40+
api(project(":h2o-parquet-parser")) {
41+
transitive = false
42+
}
43+
4544
}
4645

46+
apply from: "${rootDir}/h2o-parsers/h2o-parquet-parser/parquet_dependencies.gradle"
47+
4748
//
4849
// Bundle optional modules
4950
// The process is defined by convention. There are two flags:

h2o-parsers/h2o-parquet-parser/build.gradle

+1-34
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,13 @@
33
//
44
description = "H2O Parquet Parser"
55

6-
def parquetHadoopVersion = binding.variables.get("hadoopVersion") ?
7-
binding.variables.get("hadoopVersion") : defaultHadoopVersion
8-
9-
configurations{
10-
// Configuration used to get all transitive dependencies for org.apache.hadoop:hadoop-common
11-
hadoopCommonExclude
12-
}
13-
146
dependencies {
15-
hadoopCommonExclude("org.apache.hadoop:hadoop-common:${parquetHadoopVersion}")
16-
17-
api project(":h2o-core")
18-
api(project(":h2o-persist-hdfs")) {
19-
exclude group: 'ai.h2o', module: 'h2o-core'
20-
exclude group: 'net.java.dev.jets3t', module: 'jets3t'
21-
exclude group: 'org.apache.hadoop', module: 'hadoop-client'
22-
exclude group: 'org.apache.hadoop', module: 'hadoop-aws'
23-
}
24-
25-
// Parquet support
26-
api("org.apache.parquet:parquet-hadoop:${defaultParquetVersion}")
27-
28-
29-
api("org.apache.hadoop:hadoop-common:${parquetHadoopVersion}") {
30-
// we can't use transitive=false so we need to exclude the dependencies manually
31-
configurations.hadoopCommonExclude.getResolvedConfiguration().getResolvedArtifacts().each {
32-
if (it.moduleVersion.id.group != "org.apache.hadoop" && it.moduleVersion.id.module.name != "hadoop-common") {
33-
exclude group: it.moduleVersion.id.group, module: it.moduleVersion.id.module.name
34-
}
35-
}
36-
}
37-
implementation("org.apache.hadoop:hadoop-mapreduce-client-core:${parquetHadoopVersion}") {
38-
transitive = false
39-
}
40-
417
testImplementation project(":h2o-test-support")
428
testImplementation project(":h2o-parquet-parser-tests")
439
testRuntimeOnly project(":${defaultWebserverModule}")
4410
}
4511

12+
apply from: "${rootDir}/h2o-parsers/h2o-parquet-parser/parquet_dependencies.gradle"
4613
apply from: "${rootDir}/gradle/dataCheck.gradle"
4714

4815
test {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
def parquetHadoopVersion = binding.variables.get("hadoopVersion") ?
2+
binding.variables.get("hadoopVersion") : defaultHadoopVersion
3+
4+
configurations{
5+
// Configuration used to get all transitive dependencies for org.apache.hadoop:hadoop-common
6+
hadoopCommonExclude
7+
}
8+
9+
dependencies {
10+
hadoopCommonExclude("org.apache.hadoop:hadoop-common:${parquetHadoopVersion}")
11+
12+
api project(":h2o-core")
13+
api(project(":h2o-persist-hdfs")) {
14+
exclude group: 'ai.h2o', module: 'h2o-core'
15+
exclude group: 'net.java.dev.jets3t', module: 'jets3t'
16+
exclude group: 'org.apache.hadoop', module: 'hadoop-client'
17+
exclude group: 'org.apache.hadoop', module: 'hadoop-aws'
18+
}
19+
20+
// Parquet support
21+
api("org.apache.parquet:parquet-hadoop:${defaultParquetVersion}")
22+
23+
24+
api("org.apache.hadoop:hadoop-common:${parquetHadoopVersion}") {
25+
// we can't use transitive=false so we need to exclude the dependencies manually
26+
configurations.hadoopCommonExclude.getResolvedConfiguration().getResolvedArtifacts().each {
27+
if (it.moduleVersion.id.group != "org.apache.hadoop" && it.moduleVersion.id.module.name != "hadoop-common") {
28+
exclude group: it.moduleVersion.id.group, module: it.moduleVersion.id.module.name
29+
}
30+
}
31+
}
32+
implementation("org.apache.hadoop:hadoop-mapreduce-client-core:${parquetHadoopVersion}") {
33+
transitive = false
34+
}
35+
}

0 commit comments

Comments
 (0)