You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2021/04/06 22:17:30 UTC
[spark] branch branch-3.1 updated: [SPARK-34965][BUILD] Remove
.sbtopts that duplicately sets the default memory
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new eefef50 [SPARK-34965][BUILD] Remove .sbtopts that duplicately sets the default memory
eefef50 is described below
commit eefef508c27786d4a86d170d4cd0b569c482946b
Author: HyukjinKwon <gu...@apache.org>
AuthorDate: Tue Apr 6 15:16:09 2021 -0700
[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 https://github.com/apache/spark/pull/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 <gu...@apache.org>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
(cherry picked from commit 2eda1c65ea122b21c75d19bd3a6c58c905cb7304)
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
.sbtopts | 17 -----------------
build/sbt | 1 +
build/sbt-launch-lib.bash | 2 +-
3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/.sbtopts b/.sbtopts
deleted file mode 100644
index 9afbdca..0000000
--- a/.sbtopts
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
--J-Xmx4G
--J-Xss4m
diff --git a/build/sbt b/build/sbt
index 475dfd3..ae9ca93 100755
--- a/build/sbt
+++ b/build/sbt
@@ -53,6 +53,7 @@ realpath () {
declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy"
declare -r sbt_opts_file=".sbtopts"
declare -r etc_sbt_opts_file="/etc/sbt/sbtopts"
+declare -r default_sbt_opts="-Xss4m"
usage() {
cat <<EOM
diff --git a/build/sbt-launch-lib.bash b/build/sbt-launch-lib.bash
index 1d79989..8fb6672 100755
--- a/build/sbt-launch-lib.bash
+++ b/build/sbt-launch-lib.bash
@@ -17,7 +17,7 @@ declare -a java_args
declare -a scalac_args
declare -a sbt_commands
declare -a maven_profiles
-declare sbt_default_mem=2048
+declare sbt_default_mem=4096
if test -x "$JAVA_HOME/bin/java"; then
echo -e "Using $JAVA_HOME as default JAVA_HOME."
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org