Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-21708][BUILD] Migrate build to sbt 1.x #29286

Closed
wants to merge 15 commits into from

Conversation

gemelen
Copy link
Contributor

@gemelen gemelen commented Jul 29, 2020

What changes were proposed in this pull request?

Migrate sbt-launcher URL to download one for sbt 1.x.
Update plugins versions where required by sbt update.
Change sbt version to be used to latest released at the moment, 1.3.13
Adjust build settings according to plugins and sbt changes.

Why are the changes needed?

Migration to sbt 1.x:

  1. enhances dev experience in development
  2. updates build plugins to bring there new features/to fix bugs in them
  3. enhances build performance on sbt side
  4. eases movement to Scala 3 / dotty

Does this PR introduce any user-facing change?

No.

How was this patch tested?

All existing tests passed, both on Jenkins and via Github Actions, also manually for Scala 2.13 profile.

@HyukjinKwon
Copy link
Member

It would be nice if we can manage to upgrade!

@gemelen
Copy link
Contributor Author

gemelen commented Jul 30, 2020

Yeah, it's really time to get there :)

Right now first blocker is known issue with sbt-pom-reader not issuing test-scoped dependencies. I'll proceed with solving that (probably by submitting PR there).

@HyukjinKwon
Copy link
Member

IIRC, the sbt-pom-reader is a fork. As a temporary solution, we might need to fix it there. Or, we should resolve [this issue] to don't use our fork. See also #27307 (comment)

@gemelen
Copy link
Contributor Author

gemelen commented Jul 30, 2020

Yep, I had seen a reason to use forked one. I would prefer to fix it on upstream if possible.

@HyukjinKwon HyukjinKwon changed the title [WIP}[SPARK-21708][Build] Migrate build to sbt 1.x [WIP][SPARK-21708][BUILD] Migrate build to sbt 1.x Jul 30, 2020
@srowen
Copy link
Member

srowen commented Jul 30, 2020

+1 this would be great to fix. I tried upgrading a long time ago and hit problems I didn't know how to solve. Hope you can!

@srowen
Copy link
Member

srowen commented Aug 3, 2020

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Aug 3, 2020

Test build #126988 has finished for PR 29286 at commit 9b436e0.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gemelen
Copy link
Contributor Author

gemelen commented Aug 3, 2020

@srowen it'd fail at this moment without a chance.
I submitted a change to sbt-pom-reader to fix dependency issue sbt/sbt-pom-reader#53 (waiting for some kind of resolution) and then I'd proceed with other issues - in my local build only with updated plugin I'm able to run like 2/3 of tests successfully for now.

@gemelen
Copy link
Contributor Author

gemelen commented Aug 21, 2020

I'm not sure that it'd be invoked, but let's see :)

Jenkins test this please

@ScrapCodes
Copy link
Member

ScrapCodes commented Aug 24, 2020

@gemelen Thanks for doing this work ! I saw that your other PR is already merged to sbt-pom-reader. Hoping that we get rid of that fork. If you need any help, feel free to ping me.

@gemelen
Copy link
Contributor Author

gemelen commented Aug 24, 2020

Could please someone request Jenkins build for me?

Regarding GH Action tests failing - I'll debug it in separate PR, since it sounds like some simple issue, but needs few temporary logging enhancements.

@ScrapCodes
Copy link
Member

Jenkins, retest this please.

@viirya
Copy link
Member

viirya commented Aug 24, 2020

retest this please

@SparkQA
Copy link

SparkQA commented Aug 24, 2020

Test build #127854 has finished for PR 29286 at commit 9b63267.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gemelen
Copy link
Contributor Author

gemelen commented Aug 24, 2020

I found out that GH Action fails because files in build directory are checked out from repo and then are overridden from cache:

in .github/workflows/master.yml

    steps:
    - name: Checkout Spark repository
      uses: actions/checkout@v2
      # In order to fetch changed files
      with:
        fetch-depth: 0
    # Cache local repositories. Note that GitHub Actions cache has a 2G limit.
    - name: Cache Scala, SBT, Maven and Zinc
      uses: actions/cache@v1
      with:
        path: build
        key: build-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          build-

@HyukjinKwon could you please advise how to proceed with that issue?

@viirya
Copy link
Member

viirya commented Aug 25, 2020

retest this please

@SparkQA
Copy link

SparkQA commented Aug 25, 2020

Test build #127863 has finished for PR 29286 at commit 4d94834.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gemelen
Copy link
Contributor Author

gemelen commented Aug 25, 2020

Ok, MiMa is to be upgraded too :)
As per SPARK-29560, it was inevitable anyway.

@HyukjinKwon
Copy link
Member

I made a PR to fix GitHub Actions at #29536. Thanks for investigation.

@gemelen
Copy link
Contributor Author

gemelen commented Aug 25, 2020

I've applied changes for sbt-mima plugin upgrade and there are compatibility issues reported by its task.
Ticket SPARK-32702 with description and details is filed, and I'd be glad if someone could direct me on how to address those errors.

HyukjinKwon added a commit that referenced this pull request Aug 26, 2020
…tHub Actions

### What changes were proposed in this pull request?

This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment)

Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored.

### Why are the changes needed?

To make GitHub Actions build stable.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

The builds in this PR test it out.

Closes #29536 from HyukjinKwon/SPARK-32695.

Authored-by: HyukjinKwon <gurwls223@apache.org>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
HyukjinKwon added a commit that referenced this pull request Aug 26, 2020
…tHub Actions

### What changes were proposed in this pull request?

This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment)

Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored.

### Why are the changes needed?

To make GitHub Actions build stable.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

The builds in this PR test it out.

Closes #29536 from HyukjinKwon/SPARK-32695.

Authored-by: HyukjinKwon <gurwls223@apache.org>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit b07e742)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
HyukjinKwon added a commit that referenced this pull request Aug 26, 2020
…tHub Actions

### What changes were proposed in this pull request?

This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment)

Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored.

### Why are the changes needed?

To make GitHub Actions build stable.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

The builds in this PR test it out.

Closes #29536 from HyukjinKwon/SPARK-32695.

Authored-by: HyukjinKwon <gurwls223@apache.org>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit b07e742)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@HyukjinKwon
Copy link
Member

@gemelen, once you rebase, GitHub Actions build should not overwrite build directory anymore.

@srowen
Copy link
Member

srowen commented Sep 2, 2020

@gemelen thanks for the work here - does the latest change unblock you?

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this, @gemelen .

BTW, could you make another PR for mima change? We need to do that separately like SPARK-26030 (Bump previousSparkVersion in MimaBuild.scala to be 2.4.0). According to #22977 (comment) and #22977 (comment), we need to use 3.0.0 when 3.0.0 is released.

def mimaSettings(sparkHome: File, projectRef: ProjectRef): Seq[Setting[_]] = {
     val organization = "org.apache.spark"
-     val previousSparkVersion = "2.4.0"
+     val previousSparkVersion = "3.0.0"

cc @gatorsmile , @cloud-fan

@gemelen
Copy link
Contributor Author

gemelen commented Oct 7, 2020

@dongjoon-hyun

BTW, could you make another PR for mima change? We need to do that separately like SPARK-26030 (Bump previousSparkVersion in MimaBuild.scala to be 2.4.0).

def mimaSettings(sparkHome: File, projectRef: ProjectRef): Seq[Setting[_]] = {
     val organization = "org.apache.spark"
-     val previousSparkVersion = "2.4.0"
+     val previousSparkVersion = "3.0.0"

I'm afraid that it's not viable:
move to sbt 1.x requires to upgrade mima plugin (in fact it's a huge leap, from 0.3.0 to 0.8.0). Doing so without bumping version to check against for binary incompatibilities (ie master vs 2.4) generates more than a thousand of newly found hits, see details here - https://issues.apache.org/jira/browse/SPARK-32702

UPD: previousSparkVersion may be changed on backporting to 2.4 branch, so it won't be a problem there

@dongjoon-hyun
Copy link
Member

Oh, thank you for the context, @gemelen .

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, thanks. I think we can merge.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. I agree that. We can merge this.

@dongjoon-hyun
Copy link
Member

Hi, @gemelen . What is your Apache JIRA ID?

@gemelen
Copy link
Contributor Author

gemelen commented Oct 7, 2020

@dongjoon-hyun the same as github username, gemelen

@gemelen gemelen deleted the feature/sbt-1.x branch October 7, 2020 22:34
@dongjoon-hyun
Copy link
Member

Thanks. You are added to the Apache Spark contributor group and SPARK-21708 is assigned to you.
Welcome to the Apache Spark community!

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Oct 11, 2020

Hi, All.

It turns out that Hadoop 2.7 / Hive 2.3 combination SBT build is broken by this commit.

BEFORE THIS COMMIT

$ build/sbt "yarn/testOnly *.YarnClusterSuite -- -z SparkHadoopUtil" -Pyarn -Phadoop-2.7 -Phive -Phive-2.3
...
[info] YarnClusterSuite:
[info] - yarn-cluster should respect conf overrides in SparkHadoopUtil (SPARK-16414, SPARK-23630) (12 seconds, 193 milliseconds)
[info] ScalaTest
[info] Run completed in 29 seconds, 774 milliseconds.
[info] Total number of tests run: 1
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1
[success] Total time: 122 s, completed Oct 10, 2020 5:21:55 PM

$ git log --oneline -n1
23afc930ae (HEAD) [SPARK-26499][SQL][FOLLOWUP] Print the loading provider exception starting from the INFO level

AFTER THIS COMMIT

$ build/sbt "yarn/testOnly *.YarnClusterSuite -- -z SparkHadoopUtil" -Pyarn -Phadoop-2.7 -Phive -Phive-2.3
...
[info] *** 1 TEST FAILED ***
[error] Failed: Total 1, Failed 1, Errors 0, Passed 0
[error] Failed tests:
[error] 	org.apache.spark.deploy.yarn.YarnClusterSuite
[error] (yarn / Test / testOnly) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 132 s (02:12), completed Oct 10, 2020 5:28:29 PM

$ git log --oneline -n1
6daa2aeb01 (HEAD) [SPARK-21708][BUILD] Migrate build to sbt 1.x

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Oct 11, 2020

The failure is tracked by SPARK-33104 .
In addition to this, SBT 1.3 also breaks dependencyTree plugin (SPARK-33108). So, the investigation is still delayed a little. I'm still looking SPARK-33104.

# limitations under the License.

-J-Xmx4G
-J-Xss4m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gemelen sorry for the very late comment but do you remember why we added this? The default memory has set in build/sbt-launch-lib.bash (e.g., see 35bab33). Were you using plain sbt instead of build/sbt in your local?

This file disables the memory option from the build/sbt script:

./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:

/.../bin/java -Xms6144m -Xmx6144m -XX:ReservedCodeCacheSize=256m -Xmx4G -Xss4m -jar build/sbt-launch-1.5.0.jar 1

and Java respects the rightmost memory configurations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, okay it sets the stack size here. I misread it. Okay but I will still move this to the script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HyukjinKwon AFAIR stack size increase was introduced to overcome failures on some tasks (tests probably). Yep, definitely could be set anywhere it is more suitable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message says it was for Github Actions env in fact

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explanation!

dongjoon-hyun pushed a commit that referenced this pull request Apr 6, 2021
…t 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 <gurwls223@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
dongjoon-hyun pushed a commit that referenced this pull request Apr 6, 2021
…t 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 <gurwls223@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
(cherry picked from commit 2eda1c6)
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
LorenzoMartini pushed a commit to palantir/spark that referenced this pull request Apr 19, 2021
Migrate sbt-launcher URL to download one for sbt 1.x.
Update plugins versions where required by sbt update.
Change sbt version to be used to latest released at the moment, 1.3.13
Adjust build settings according to plugins and sbt changes.

Migration to sbt 1.x:
1. enhances dev experience in development
2. updates build plugins to bring there new features/to fix bugs in them
3. enhances build performance on sbt side
4. eases movement to Scala 3 / dotty

No.

All existing tests passed, both on Jenkins and via Github Actions, also manually for Scala 2.13 profile.

Closes apache#29286 from gemelen/feature/sbt-1.x.

Authored-by: Denis Pyshev <git@gemelen.net>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
LorenzoMartini pushed a commit to palantir/spark that referenced this pull request Apr 20, 2021
Migrate sbt-launcher URL to download one for sbt 1.x.
Update plugins versions where required by sbt update.
Change sbt version to be used to latest released at the moment, 1.3.13
Adjust build settings according to plugins and sbt changes.

Migration to sbt 1.x:
1. enhances dev experience in development
2. updates build plugins to bring there new features/to fix bugs in them
3. enhances build performance on sbt side
4. eases movement to Scala 3 / dotty

No.

All existing tests passed, both on Jenkins and via Github Actions, also manually for Scala 2.13 profile.

Closes apache#29286 from gemelen/feature/sbt-1.x.

Authored-by: Denis Pyshev <git@gemelen.net>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
LorenzoMartini pushed a commit to palantir/spark that referenced this pull request Apr 20, 2021
Migrate sbt-launcher URL to download one for sbt 1.x.
Update plugins versions where required by sbt update.
Change sbt version to be used to latest released at the moment, 1.3.13
Adjust build settings according to plugins and sbt changes.

Migration to sbt 1.x:
1. enhances dev experience in development
2. updates build plugins to bring there new features/to fix bugs in them
3. enhances build performance on sbt side
4. eases movement to Scala 3 / dotty

No.

All existing tests passed, both on Jenkins and via Github Actions, also manually for Scala 2.13 profile.

Closes apache#29286 from gemelen/feature/sbt-1.x.

Authored-by: Denis Pyshev <git@gemelen.net>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
16pierre pushed a commit to 16pierre/spark that referenced this pull request May 24, 2021
Migrate sbt-launcher URL to download one for sbt 1.x.
Update plugins versions where required by sbt update.
Change sbt version to be used to latest released at the moment, 1.3.13
Adjust build settings according to plugins and sbt changes.

Migration to sbt 1.x:
1. enhances dev experience in development
2. updates build plugins to bring there new features/to fix bugs in them
3. enhances build performance on sbt side
4. eases movement to Scala 3 / dotty

No.

All existing tests passed, both on Jenkins and via Github Actions, also manually for Scala 2.13 profile.

Closes apache#29286 from gemelen/feature/sbt-1.x.

Authored-by: Denis Pyshev <git@gemelen.net>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
dongjoon-hyun pushed a commit that referenced this pull request Jul 2, 2021
### What changes were proposed in this pull request?

This PR removes sbt-avro plugin dependency.
In the current master, Build with SBT depends on the plugin but it seems never used.
Originally, the plugin was introduced for `flume-sink` in SPARK-1729 (#807) but `flume-sink` is no longer in Spark repository.

After SBT was upgraded to 1.x in SPARK-21708 (#29286), `avroGenerate` part was introduced in `object SQL` in `SparkBuild.scala`.
It's confusable but I understand `Test / avroGenerate := (Compile / avroGenerate).value` is for suppressing sbt-avro for `sql` sub-module.
In fact, Test/compile will fail if `Test / avroGenerate :=(Compile / avroGenerate).value` is commented out.

`sql` sub-module contains `parquet-compat.avpr` and `parquet-compat.avdl` but according to `sql/core/src/test/README.md`, they are intended to be handled by `gen-avro.sh`.

Also, in terms of Maven build, there seems to be no definition to handle `*.avpr` or `*.avdl`.

Based on the above, I think we can remove `sbt-avro`.

### Why are the changes needed?

If `sbt-avro` is really no longer used, it's confusable that `sbt-avro` related configurations are in `SparkBuild.scala`.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

GA.

Closes #33190 from sarutak/remove-avro-from-sbt.

Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun pushed a commit that referenced this pull request Jul 2, 2021
### What changes were proposed in this pull request?

This PR removes sbt-avro plugin dependency.
In the current master, Build with SBT depends on the plugin but it seems never used.
Originally, the plugin was introduced for `flume-sink` in SPARK-1729 (#807) but `flume-sink` is no longer in Spark repository.

After SBT was upgraded to 1.x in SPARK-21708 (#29286), `avroGenerate` part was introduced in `object SQL` in `SparkBuild.scala`.
It's confusable but I understand `Test / avroGenerate := (Compile / avroGenerate).value` is for suppressing sbt-avro for `sql` sub-module.
In fact, Test/compile will fail if `Test / avroGenerate :=(Compile / avroGenerate).value` is commented out.

`sql` sub-module contains `parquet-compat.avpr` and `parquet-compat.avdl` but according to `sql/core/src/test/README.md`, they are intended to be handled by `gen-avro.sh`.

Also, in terms of Maven build, there seems to be no definition to handle `*.avpr` or `*.avdl`.

Based on the above, I think we can remove `sbt-avro`.

### Why are the changes needed?

If `sbt-avro` is really no longer used, it's confusable that `sbt-avro` related configurations are in `SparkBuild.scala`.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

GA.

Closes #33190 from sarutak/remove-avro-from-sbt.

Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 6c4616b)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
flyrain pushed a commit to flyrain/spark that referenced this pull request Sep 21, 2021
…t memory

### What changes were proposed in this pull request?

This PR removes `.sbtopts` (added in apache#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 apache#32062 from HyukjinKwon/SPARK-34965.

Authored-by: HyukjinKwon <gurwls223@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
(cherry picked from commit 2eda1c6)
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants