Repository: spark
Updated Branches:
  refs/heads/branch-2.4 cb2827d28 -> 313a1f0a7


[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 <incompl...@gmail.com>
Signed-off-by: Sean Owen <sean.o...@databricks.com>
(cherry picked from commit 6aa506394958bfb30cd2a9085a5e8e8be927de51)
Signed-off-by: Sean Owen <sean.o...@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/313a1f0a
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/313a1f0a
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/313a1f0a

Branch: refs/heads/branch-2.4
Commit: 313a1f0a7aa325ea4038530fc12fad695c7d9809
Parents: cb2827d
Author: shane knapp <incompl...@gmail.com>
Authored: Fri Oct 26 16:37:36 2018 -0500
Committer: Sean Owen <sean.o...@databricks.com>
Committed: Fri Oct 26 16:37:50 2018 -0500

----------------------------------------------------------------------
 build/mvn | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/313a1f0a/build/mvn
----------------------------------------------------------------------
diff --git a/build/mvn b/build/mvn
index b60ea64..3816993 100755
--- a/build/mvn
+++ b/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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to