aboutsummaryrefslogtreecommitdiff
path: root/build/mvn
diff options
context:
space:
mode:
authorPatrick Wendell <patrick@databricks.com>2015-02-17 10:10:01 -0800
committerPatrick Wendell <patrick@databricks.com>2015-02-17 10:10:01 -0800
commit3ce46e94fe77d15f18e916b76b37fa96356ace93 (patch)
tree716ec5375108c1f5df7043cf013d38c1ed0e2071 /build/mvn
parentee6e3eff02e9e08b1113ba6faf3397d7e7775087 (diff)
downloadspark-3ce46e94fe77d15f18e916b76b37fa96356ace93.tar.gz
spark-3ce46e94fe77d15f18e916b76b37fa96356ace93.tar.bz2
spark-3ce46e94fe77d15f18e916b76b37fa96356ace93.zip
SPARK-5856: In Maven build script, launch Zinc with more memory
I've seen out of memory exceptions when trying to run many parallel builds against the same Zinc server during packaging. We should use the same increased memory settings we use for Maven itself. I tested this and confirmed that the Nailgun JVM launched with higher memory. Author: Patrick Wendell <patrick@databricks.com> Closes #4643 from pwendell/zinc-memory and squashes the following commits: 717cfb0 [Patrick Wendell] SPARK-5856: Launch Zinc with larger memory options.
Diffstat (limited to 'build/mvn')
-rwxr-xr-xbuild/mvn5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/mvn b/build/mvn
index 53babf54de..3561110a4c 100755
--- a/build/mvn
+++ b/build/mvn
@@ -21,6 +21,8 @@
_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Preserve the calling directory
_CALLING_DIR="$(pwd)"
+# Options used during compilation
+_COMPILE_JVM_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"
# Installs any application tarball given a URL, the expected tarball name,
# and, optionally, a checkable binary path to determine if the binary has
@@ -136,6 +138,7 @@ 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
+ export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
${ZINC_BIN} -shutdown
${ZINC_BIN} -start -port ${ZINC_PORT} \
-scala-compiler "${SCALA_COMPILER}" \
@@ -143,7 +146,7 @@ if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`${ZINC_BIN} -status`" ]; then
fi
# Set any `mvn` options if not already present
-export MAVEN_OPTS=${MAVEN_OPTS:-"-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"}
+export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
# Last, call the `mvn` command as usual
${MVN_BIN} "$@"