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-51733][BUILD] make-distribution.sh supports sbt #50529

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Apr 7, 2025

What changes were proposed in this pull request?

Make make-distribution.sh supports sbt, developers could switch the building tool from Maven to SBT by using --sbt-enabled.

Note the packaging outputs are NOT exactly the same(e.g. shading rules have some differences), which should be improved gradually later.

Why are the changes needed?

Reduce gaps between SBT and Maven. And SBT is generally much faster than Maven, so the change would save much time for developers' daily development for cases that require packaging and testing on a real cluster.

Does this PR introduce any user-facing change?

No, it's a dev-only change.

How was this patch tested?

Manually tested on M1 Max

time dev/make-distribution.sh [--sbt-enabled] -Phive,hive-thriftserver,kubernetes

Maven

2235.03s user 100.81s system 306% cpu 12:41.77 total

SBT

688.54s user 43.54s system 346% cpu 3:31.43 total

Was this patch authored or co-authored using generative AI tooling?

No.

@pan3793
Copy link
Member Author

pan3793 commented Apr 7, 2025

cc @LuciferYang @dongjoon-hyun

| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)
SPARK_HIVE=$("$MVN" help:evaluate -Dexpression=project.activeProfiles -pl sql/hive $@ \
Copy link
Member Author

Choose a reason for hiding this comment

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

SPARK_HIVE is not used

@LuciferYang
Copy link
Contributor

I believe this is an excellent job, but what I'm curious about is whether it's feasible to convert it into an sbt-only script, or under what circumstances it could be transformed into one. Supporting both tools at the same time always makes us inclined to "align" their outputs.

@LuciferYang
Copy link
Contributor

also cc @cloud-fan ,although we may not be able to use sbt to make-distribution when version 4.0 is released.

@pan3793
Copy link
Member Author

pan3793 commented Apr 8, 2025

... but what I'm curious about is whether it's feasible to convert it into an sbt-only script, or under what circumstances it could be transformed into one.

@LuciferYang I think this depends on whether the community wants to migrate to a single SBT building tool, or just keep SBT as a faster alternative for dev only.

For the former, we must make SBT support packaging and publishing first(may take a few weeks), and ensure the SBT outputs as the same as Maven(may take a few months), then Maven can be dropped after finishing a release using SBT. For the latter, we just leave it, and improve when something affects the daily developing circles

Copy link
Contributor

@cloud-fan cloud-fan left a comment

Choose a reason for hiding this comment

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

LGTM. Please merge it to master branch only to avoid risks for the 4.0 release.

@the-sakthi
Copy link
Member

LGTM

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.

4 participants