[AURON #2020] [BUILD] Add --threads option to control Maven build parallelism.#2021
[AURON #2020] [BUILD] Add --threads option to control Maven build parallelism.#2021slfan1989 wants to merge 2 commits intoapache:masterfrom
--threads option to control Maven build parallelism.#2021Conversation
…uild parallelism. Signed-off-by: slfan1989 <slfan1989@apache.org>
|
There was a problem hiding this comment.
Pull request overview
Adds a new --threads option to auron-build.sh so users can control Maven parallelism, removing the previously hardcoded Docker -T8 behavior while keeping existing defaults (local single-threaded; Docker defaults to 8 threads).
Changes:
- Add
--threadsCLI option, plumbed into Maven-Thandling with precedence: user-specified > Docker default (8) > local default (unset). - Remove the Docker-only hardcoded
-T8addition and centralize thread selection in one place. - Document the new option and defaults in
CONTRIBUTING.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| auron-build.sh | Adds --threads parsing and centralizes Maven -T argument selection for local vs Docker builds. |
| CONTRIBUTING.md | Documents the new --threads build option and default behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - `--celeborn`, `--uniffle`, `--paimon`, `--iceberg`: Optional integrations | ||
| - `--skiptests`: Skip unit tests (default: true) | ||
| - `--sparktests`: Run Spark integration tests | ||
| - `--threads`: Maven build threads (e.g. 1, 4, 1C). Defaults to single-threaded local builds; Docker defaults to 8 unless overridden. |
There was a problem hiding this comment.
Single thread for local builds might be too low, should we at least do 4? If machines are not able to handle it (seems like the edge case to me), they can always tune it.
There was a problem hiding this comment.
Thanks for the review! I think it's safer to keep the default at 1 thread in this PR to match the current behavior. We can bump it to 4 (or more) in a separate follow-up PR once this lands. Does that sound reasonable to you?
There was a problem hiding this comment.
That's fair, thanks
…uild parallelism. Signed-off-by: slfan1989 <slfan1989@apache.org>
Which issue does this PR close?
Closes #2020
Rationale for this change
Currently, local builds are always single-threaded, which can be slow on multi-core machines. Docker builds hardcode
-T8, which cannot be overridden by users. This change adds a--threadsoption toauron-build.shto give users control over Maven build parallelism.What changes are included in this PR?
auron-build.sh
--threadsparameter parsing and validation-T8from Docker build sectionCONTRIBUTING.md
--threadsoption under Build Options sectionAre there any user-facing changes?
Yes. Users can now specify
--threadsto control Maven build parallelismDefault behavior remains unchanged (backward compatible):
How was this patch tested?
./auron-build.sh --helpdisplays correct usage information