Add JVM options for spark build to avoid StackOverflowError
@@ -30,6 +30,9 @@ BUILD_OPTS="-Divy.home=${HOME}/.ivy2 -Dsbt.ivy.home=${HOME}/.ivy2 -Duser.home=${
-Dguava.version=27.0-jre \
$SPARK_BUILD_OPTS"
+# BIGTOP-3762
+export MAVEN_OPTS="${MAVEN_OPTS:--Xss64m -Xmx4g -XX:ReservedCodeCacheSize=1g}"
+
./dev/make-distribution.sh --mvn mvn --r $BUILD_OPTS -DskipTests
SPARK_SKIP_TESTS=$([ "$SPARK_RUN_TESTS" = "true" ] && echo false || echo true)
