Skip to content

Commit 712679f

Browse files
authored
Upgrade to Gradle 7.5 (elastic#1980)
The ES project recently upgraded Gradle and now some build code from ES depends on new methods. Additionally, the Spark version in QA has disappeared and a new version of Spark needs to be added for testing.
1 parent a4d1407 commit 712679f

File tree

7 files changed

+7
-2
lines changed

7 files changed

+7
-2
lines changed

buildSrc/src/main/groovy/org/elasticsearch/hadoop/gradle/fixture/hadoop/services/SparkYarnServiceDescriptor.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class SparkYarnServiceDescriptor implements ServiceDescriptor {
5656

5757
@Override
5858
Version defaultVersion() {
59-
return new Version(3, 2, 1)
59+
return new Version(3, 2, 2)
6060
}
6161

6262
String hadoopVersionCompatibility() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

hive/src/itest/java/org/elasticsearch/hadoop/integration/hive/HiveEmbeddedServer2.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public void start() throws Exception {
8989
hiveServer = new HiveServer2();
9090
port = MetaStoreUtils.findFreePort();
9191
config.setIntVar(ConfVars.HIVE_SERVER2_THRIFT_PORT, port);
92+
config.setIntVar(ConfVars.HIVE_SERVER2_WEBUI_PORT, 0); // Disable web UI
9293
hiveServer.init(config);
9394
hiveServer.start();
9495
waitForStartup();

mr/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ itestJar {
131131

132132
tasks.named("test").configure {
133133
jvmArgs "--add-opens=java.base/java.io=ALL-UNNAMED" // Needed for IOUtils's BYTE_ARRAY_BUFFER reflection
134+
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" // Needed for secure mock
134135
}
135136

136137
eclipse.classpath.file {

spark/core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ if (JavaVersion.current() >= JavaVersion.VERSION_17) {
150150
task.configure {
151151
jvmArgs "--add-opens=java.base/java.io=ALL-UNNAMED" // Needed for IOUtils's BYTE_ARRAY_BUFFER reflection
152152
jvmArgs "--add-opens=java.base/java.nio=ALL-UNNAMED" // Needed for org.apache.spark.SparkConf, which indirectly uses java.nio.DirectByteBuffer
153+
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" // Needed for secure mock
153154
}
154155
}
155156
}

spark/sql-20/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ if (JavaVersion.current() >= JavaVersion.VERSION_16) {
200200
if (task.getName().startsWith("test"))
201201
task.configure {
202202
jvmArgs "--add-opens=java.base/java.io=ALL-UNNAMED" // Needed for IOUtils's BYTE_ARRAY_BUFFER reflection
203+
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" // Needed for secure mock
203204
}}
204205
}
205206

spark/sql-30/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ if (JavaVersion.current() >= JavaVersion.VERSION_16) {
172172
task.configure {
173173
jvmArgs "--add-opens=java.base/java.io=ALL-UNNAMED" // Needed for IOUtils's BYTE_ARRAY_BUFFER reflection
174174
jvmArgs "--add-opens=java.base/java.nio=ALL-UNNAMED" // Needed for org.apache.spark.SparkConf, which indirectly uses java.nio.DirectByteBuffer
175+
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" // Needed for secure mock
175176
}}
176177
}
177178

0 commit comments

Comments
 (0)