From 20d32242a2574637d18771c2f7de5c9878f85bad Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Mon, 10 May 2021 00:29:05 -0700 Subject: [PATCH] [SPARK-35358][BUILD] Increase maximum Java heap used for release build to avoid OOM ### What changes were proposed in this pull request? This patch proposes to increase the maximum heap memory setting for release build. ### Why are the changes needed? When I was cutting RCs for 2.4.8, I frequently encountered OOM during building using mvn. It happens many times until I increased the heap memory setting. I am not sure if other release managers encounter the same issue. So I propose to increase the heap memory setting and see if it looks good for others. ### Does this PR introduce _any_ user-facing change? No, dev only. ### How was this patch tested? Manually used it during cutting RCs of 2.4.8. Closes #32487 from viirya/release-mvn-oom. Authored-by: Liang-Chi Hsieh Signed-off-by: Dongjoon Hyun --- dev/create-release/release-build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/create-release/release-build.sh b/dev/create-release/release-build.sh index ef7e1523ea..f406be9548 100755 --- a/dev/create-release/release-build.sh +++ b/dev/create-release/release-build.sh @@ -162,6 +162,8 @@ git clean -d -f -x rm -f .gitignore cd .. +export MAVEN_OPTS="-Xmx12g" + if [[ "$1" == "package" ]]; then # Source and binary tarballs echo "Packaging release source tarballs"