Skip to content

Commit 8e4ee9d

Browse files
committed
Updating spark and scala version what we require at Interset
- modelled from elastic#1308 - added a script to install it locally for my mediocre test purposes
1 parent 08c87a2 commit 8e4ee9d

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jacksonVersion = 1.8.8
1919
cascadingVersion = 2.6.3
2020
# Spark
2121
spark13Version = 1.6.2
22-
spark20Version = 2.3.0
22+
spark20Version = 2.4.4
2323
# same as Spark's
2424
scala210Version = 2.10.7
2525
scala210MajorVersion = 2.10
2626
scala211Version = 2.11.12
2727
scala211MajorVersion = 2.11
28+
scala212Version = 2.12.10
29+
scala212MajorVersion = 2.12
2830

2931
stormVersion = 1.0.6
3032

install_local.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set -e
3+
4+
PROJECT_ROOT=$(git rev-parse --show-toplevel)
5+
6+
echo "Building es-hadoop jars with gradlew..."
7+
sh ${PROJECT_ROOT}/gradlew
8+
9+
# JAR and pom file
10+
JAR="${PROJECT_ROOT}/build/distributions/elasticsearch-hadoop-6.8.12-SNAPSHOT/dist/elasticsearch-spark-20_2.12-6.8.12-SNAPSHOT.jar"
11+
12+
# These should match the existing maven dependency
13+
# for the artifact you're pulling from repo
14+
GROUP_ID="org.elasticsearch"
15+
ARTIFACT_ID="elasticsearch-spark-20_2.12"
16+
VERSION="6.8.12-SNAPSHOT"
17+
18+
echo "INSTALLING JAR FILE: ${JAR}"
19+
echo " [group].[artifact]-[version]: ${GROUP_ID}.${ARTIFACT_ID}-${VERSION}"
20+
echo "INSTALLING POM FILE: ${POM}"
21+
22+
mvn install:install-file \
23+
-Dfile=${JAR} \
24+
-DgroupId=${GROUP_ID} \
25+
-DartifactId=${ARTIFACT_ID} \
26+
-Dversion=${VERSION} \
27+
-Dpackaging=jar

spark/core/main/scala/org/elasticsearch/spark/rdd/EsRDDWriter.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ private[spark] class EsRDDWriter[T: ClassTag](val serializedSettings: String,
6464
def write(taskContext: TaskContext, data: Iterator[T]) {
6565
val writer = RestService.createWriter(settings, taskContext.partitionId.toLong, -1, log)
6666

67-
taskContext.addTaskCompletionListener((TaskContext) => writer.close())
67+
taskContext.addTaskCompletionListener(TaskContext => {
68+
writer.close()
69+
Unit
70+
})
6871

6972
if (runtimeMetadata) {
7073
writer.repository.addRuntimeFieldExtractor(metaExtractor)

spark/sql-20/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ apply plugin: 'es.hadoop.build.integration'
88
apply plugin: 'scala.variants'
99

1010
variants {
11-
defaultVersion '2.11.12'
12-
targetVersions '2.10.7', '2.11.12'
11+
defaultVersion '2.12.10'
12+
targetVersions '2.10.7', '2.11.12', '2.12.10'
1313
}
1414

1515
println "Compiled using Scala ${project.ext.scalaMajorVersion} [${project.ext.scalaVersion}]"

0 commit comments

Comments
 (0)