Repository: spark
Updated Branches:
  refs/heads/branch-1.3 cd5d1be6e -> 384793dff


[SPARK-9607] [SPARK-9608] fix zinc-port handling in build/mvn

- pass `$ZINC_PORT` to zinc status/shutdown commands
- fix path check that sets `$ZINC_INSTALL_FLAG`, which was incorrectly
  causing zinc to be shutdown and restarted every time (with mismatched
  ports on those commands to boot)
- pass `-DzincPort=${ZINC_PORT}` to maven, to use the correct zinc port
  when building

Author: Ryan Williams <ryan.blake.willi...@gmail.com>

Closes #7944 from ryan-williams/zinc-status and squashes the following commits:

619c520 [Ryan Williams] fix zinc status/shutdown commands

(cherry picked from commit e27a8c4cb3564f1b2d1ee5445dff341c8e0087b0)
Signed-off-by: Sean Owen <so...@cloudera.com>


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

Branch: refs/heads/branch-1.3
Commit: 384793dff7e5a288fb145e46be2f0c8db07b04b9
Parents: cd5d1be
Author: Ryan Williams <ryan.blake.willi...@gmail.com>
Authored: Wed Aug 5 11:10:47 2015 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Wed Aug 5 11:11:22 2015 +0100

----------------------------------------------------------------------
 build/mvn | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/384793df/build/mvn
----------------------------------------------------------------------
diff --git a/build/mvn b/build/mvn
index 3561110..e10e24d 100755
--- a/build/mvn
+++ b/build/mvn
@@ -79,7 +79,7 @@ install_mvn() {
 # Install zinc under the build/ folder
 install_zinc() {
   local zinc_path="zinc-0.3.5.3/bin/zinc"
-  [ ! -f "${zinc_path}" ] && ZINC_INSTALL_FLAG=1
+  [ ! -f "${_DIR}/${zinc_path}" ] && ZINC_INSTALL_FLAG=1
   install_app \
     "http://downloads.typesafe.com/zinc/0.3.5.3"; \
     "zinc-0.3.5.3.tgz" \
@@ -137,9 +137,9 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`${ZINC_BIN} -status`" ]; then
+if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`${ZINC_BIN} -status -port 
${ZINC_PORT}`" ]; then
   export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-  ${ZINC_BIN} -shutdown
+  ${ZINC_BIN} -shutdown -port ${ZINC_PORT}
   ${ZINC_BIN} -start -port ${ZINC_PORT} \
     -scala-compiler "${SCALA_COMPILER}" \
     -scala-library "${SCALA_LIBRARY}" &>/dev/null
@@ -149,4 +149,4 @@ fi
 export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
 
 # Last, call the `mvn` command as usual
-${MVN_BIN} "$@"
+${MVN_BIN} -DzincPort=${ZINC_PORT} "$@"


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

Reply via email to