[SPARK-28701][TEST-HADOOP3.2][TEST-JAVA11][K8S] adding java11 support for pull request builds

## What changes were proposed in this pull request?

we need to add the ability to test PRBs against java11.

see comments here:  https://github.com/apache/spark/pull/25405

## How was this patch tested?

the build system will test this.

Closes #25423 from shaneknapp/spark-prb-java11.

Authored-by: shane knapp <incomplete@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
This commit is contained in:
shane knapp 2019-08-27 00:48:01 +09:00 committed by HyukjinKwon
parent 9f8c7a2804
commit 13fd32c9a9
3 changed files with 14 additions and 1 deletions

View file

@ -168,7 +168,7 @@ def main():
# against master.
ghprb_pull_id = os.environ["ghprbPullId"]
ghprb_actual_commit = os.environ["ghprbActualCommit"]
ghprb_pull_title = os.environ["ghprbPullTitle"]
ghprb_pull_title = os.environ["ghprbPullTitle"].lower()
sha1 = os.environ["sha1"]
# Marks this build as a pull request build.

View file

@ -404,6 +404,12 @@ def run_scala_tests(build_tool, hadoop_version, test_modules, excluded_tags):
if excluded_tags:
test_profiles += ['-Dtest.exclude.tags=' + ",".join(excluded_tags)]
# set up java11 env if this is a pull request build with 'test-java11' in the title
if "test-java11" in os.environ["ghprbPullTitle"].lower():
os.environ["JAVA_HOME"] = "/usr/java/jdk-11.0.1"
os.environ["PATH"] = "%s/bin:%s" % (os.environ["JAVA_HOME"], os.environ["PATH"])
test_profiles += ['-Djava.version=11']
if build_tool == "maven":
run_scala_tests_maven(test_profiles)
else:
@ -565,6 +571,7 @@ def main():
changed_files = identify_changed_files_from_git_commits("HEAD", target_branch=target_branch)
changed_modules = determine_modules_for_files(changed_files)
excluded_tags = determine_tags_to_exclude(changed_modules)
if not changed_modules:
changed_modules = [modules.root]
excluded_tags = []

View file

@ -33,6 +33,7 @@ SERVICE_ACCOUNT=
CONTEXT=
INCLUDE_TAGS="k8s"
EXCLUDE_TAGS=
JAVA_VERSION="8"
MVN="$TEST_ROOT_DIR/build/mvn"
SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version 2>/dev/null\
@ -99,6 +100,10 @@ while (( "$#" )); do
R_IMAGE_NAME="$2"
shift
;;
--java-version)
JAVA_VERSION="$2"
shift
;;
*)
break
;;
@ -107,6 +112,7 @@ while (( "$#" )); do
done
properties=(
-Djava.version=$JAVA_VERSION \
-Dspark.kubernetes.test.sparkTgz=$SPARK_TGZ \
-Dspark.kubernetes.test.imageTag=$IMAGE_TAG \
-Dspark.kubernetes.test.imageRepo=$IMAGE_REPO \