Skip to content

Commit 2eda1c6

Browse files
HyukjinKwondongjoon-hyun
authored andcommitted
[SPARK-34965][BUILD] Remove .sbtopts that duplicately sets the default memory
### What changes were proposed in this pull request? This PR removes `.sbtopts` (added in #29286) that duplicately sets the default memory. The default memories are set: https://github.com/apache/spark/blob/3b634f66c3e4a942178a1e322ae65ce82779625d/build/sbt-launch-lib.bash#L119-L124 ### Why are the changes needed? This file disables the memory option from the `build/sbt` script: ```bash ./build/sbt -mem 6144 ``` ``` .../jdk-11.0.3.jdk/Contents/Home as default JAVA_HOME. Note, this will be overridden by -java-home if it is set. Error occurred during initialization of VM Initial heap size set to a larger value than the maximum heap size ``` because it adds these memory options at the last: ```bash /.../bin/java -Xms6144m -Xmx6144m -XX:ReservedCodeCacheSize=256m -Xmx4G -Xss4m -jar build/sbt-launch-1.5.0.jar ``` and Java respects the rightmost memory configurations. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? Manually ran SBT. It will be tested in the CIs in this Pr. Closes #32062 from HyukjinKwon/SPARK-34965. Authored-by: HyukjinKwon <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 4b5fc1d commit 2eda1c6

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

.sbtopts

Lines changed: 0 additions & 17 deletions
This file was deleted.

build/sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ realpath () {
5353
declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy"
5454
declare -r sbt_opts_file=".sbtopts"
5555
declare -r etc_sbt_opts_file="/etc/sbt/sbtopts"
56+
declare -r default_sbt_opts="-Xss4m"
5657

5758
usage() {
5859
cat <<EOM

build/sbt-launch-lib.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare -a java_args
1717
declare -a scalac_args
1818
declare -a sbt_commands
1919
declare -a maven_profiles
20-
declare sbt_default_mem=2048
20+
declare sbt_default_mem=4096
2121

2222
if test -x "$JAVA_HOME/bin/java"; then
2323
echo -e "Using $JAVA_HOME as default JAVA_HOME."

0 commit comments

Comments
 (0)