Skip to content

Commit be286c4

Browse files
committed
MLE-24402 Bumping to Hadoop 3.4.2
This is to match Flux, which is depending on Hadoop 3.4.2. Also fixed all compiler warnings, so enabling those as errors now.
1 parent 09f0cf1 commit be286c4

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@ subprojects {
3636
repositories {
3737
mavenCentral()
3838
maven {
39-
url "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
39+
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
4040
}
4141
}
4242

4343
configurations.all {
4444
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
45+
if (details.requested.group.equals("org.apache.hadoop") and details.requested.version.equals("3.4.1")) {
46+
details.useVersion "3.4.2"
47+
details.because "Using 3.4.2 to minimize CVEs and because Flux is doing the same thing. This only affects the connector tests."
48+
}
4549
if (details.requested.group.startsWith('com.fasterxml.jackson')) {
4650
details.useVersion '2.17.2'
4751
details.because 'Need to match the version used by Spark.'
@@ -79,16 +83,12 @@ subprojects {
7983
exclude module: "rocksdbjni"
8084
}
8185

82-
task allDeps(type: DependencyReportTask) {
83-
description = "Allows for generating dependency reports for every subproject in a single task."
84-
}
85-
8686
test {
8787
useJUnitPlatform()
8888
finalizedBy jacocoTestReport
8989
testLogging {
90-
events 'started', 'passed', 'skipped', 'failed'
91-
exceptionFormat 'full'
90+
events = ['started', 'passed', 'skipped', 'failed']
91+
exceptionFormat = 'full'
9292
}
9393
environment "SEMAPHORE_API_KEY", semaphoreApiKey
9494
environment "SEMAPHORE_HOST", semaphoreHost

marklogic-spark-connector/build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ test {
116116
]
117117

118118
// Increased heap size as part of the Spark 4 upgrade, as we started experiencing OOM errors in the tests.
119-
jvmArgs '-Xmx6g', '-Xms3g'
119+
jvmArgs = ['-Xmx6g', '-Xms3g']
120120
}
121121

122122
shadowJar {
@@ -145,6 +145,13 @@ java {
145145
withSourcesJar()
146146
}
147147

148+
// Allows for identifying compiler warnings and treating them as errors.
149+
tasks.withType(JavaCompile) {
150+
options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation", "-Werror"]
151+
options.deprecation = true
152+
options.warnings = true
153+
}
154+
148155
javadoc.failOnError = false
149156
// Ignores warnings on params that don't have descriptions, which is a little too noisy
150157
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
@@ -185,17 +192,17 @@ publishing {
185192
maven {
186193
if (project.hasProperty("mavenUser")) {
187194
credentials {
188-
username mavenUser
189-
password mavenPassword
195+
username = mavenUser
196+
password = mavenPassword
190197
}
191198
url publishUrl
192199
allowInsecureProtocol = true
193200
} else {
194201
name = "central"
195202
url = mavenCentralUrl
196203
credentials {
197-
username mavenCentralUsername
198-
password mavenCentralPassword
204+
username = mavenCentralUsername
205+
password = mavenCentralPassword
199206
}
200207
}
201208
}

marklogic-spark-connector/src/test/java/com/marklogic/spark/AbstractIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected final String rowsToString(List<Row> rows) {
139139
/**
140140
* Avoids having to repeat mode/save.
141141
*/
142-
protected void defaultWrite(DataFrameWriter writer) {
142+
protected void defaultWrite(DataFrameWriter<?> writer) {
143143
writer.options(defaultWriteOptions())
144144
.mode(SaveMode.Append)
145145
.save();

0 commit comments

Comments
 (0)