[SPARK-25854][BUILD] fix build/mvn
not to fail during Zinc server shutdown
## What changes were proposed in this pull request? the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). ## How was this patch tested? i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes #22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <incomplete@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
This commit is contained in:
parent
d367bdcf52
commit
6aa5063949
10
build/mvn
10
build/mvn
|
@ -153,7 +153,7 @@ if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port ${ZINC_PORT}`
|
|||
export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
|
||||
"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
|
||||
"${ZINC_BIN}" -start -port ${ZINC_PORT} \
|
||||
-server 127.0.0.1 -idle-timeout 30m \
|
||||
-server 127.0.0.1 -idle-timeout 3h \
|
||||
-scala-compiler "${SCALA_COMPILER}" \
|
||||
-scala-library "${SCALA_LIBRARY}" &>/dev/null
|
||||
fi
|
||||
|
@ -163,8 +163,12 @@ export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
|
|||
|
||||
echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
|
||||
|
||||
# Last, call the `mvn` command as usual
|
||||
# call the `mvn` command as usual
|
||||
# SPARK-25854
|
||||
"${MVN_BIN}" -DzincPort=${ZINC_PORT} "$@"
|
||||
MVN_RETCODE=$?
|
||||
|
||||
# Try to shut down zinc explicitly
|
||||
# Try to shut down zinc explicitly if the server is still running.
|
||||
"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
|
||||
|
||||
exit $MVN_RETCODE
|
||||
|
|
Loading…
Reference in a new issue