You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "rangareddy (via GitHub)" <gi...@apache.org> on 2025/10/30 15:40:20 UTC
[PR] docs: Set spark.master=local[2] for spark-shell, pyspark, and spark-sql [hudi]
rangareddy opened a new pull request, #14187:
URL: https://github.com/apache/hudi/pull/14187
### Describe the issue this Pull Request addresses
This PR standardizes the local development experience and prevents accidental connection to unintended clusters when using interactive Spark shells.
Currently, if the spark-shell, pyspark, or spark-sql scripts are executed without explicitly setting the --master flag, Spark may default to a potentially undefined or shared configuration. For common development workflows, it is safer and more efficient to guarantee a local, isolated environment.
<!-- Either describe the issue inline here with motivation behind the changes
(or) link to an issue by including `Closes #<issue-number>` for context.
If this PR includes changes to the storage format, public APIs,
or has breaking changes, use `!` (e.g., feat!: ...) -->
### Summary and Changelog
**Summary:**
Configures the default behavior of interactive Spark shell scripts (spark-shell, pyspark, spark-sql) to use a dedicated local master with two threads (local[2]).
**Changelog:**
* Modified shell scripts (spark-shell, pyspark, spark-sql) to include the --master local[2] configuration by default.
* Users can still override this setting by explicitly passing a different --master flag.
<!-- Short, plain-English summary of what users gain or what changed in behavior.
Followed by a detailed log of all the changes. Highlight if any code was copied. -->
### Impact
The impact is minor and primarily affects the development experience:
* User-facing Change: The default behavior of running spark-shell (and related interactive tools) without arguments will now always launch a 2-thread local instance, guaranteeing resource isolation for local testing.
* Performance Impact: None on actual cluster workloads. Local performance for interactive tasks may be marginally improved due to predictable resource allocation.
<!-- Describe any public API or user-facing feature change or any performance impact. -->
### Risk Level
low
This change only affects non-cluster, interactive shell execution. It does not impact production configurations, cluster deployments, or submitted application jobs. The risk is limited to local developer environments.
<!-- Accepted values: none, low, medium or high. Other than `none`, explain the risk.
If medium or high, explain what verification was done to mitigate the risks. -->
### Documentation Update
none
<!-- Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
- The config description must be updated if new configs are added or the default value of the configs are changed.
- Any new feature or user-facing change requires updating the Hudi website. Please follow the
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to make changes to the website. -->
### Contributor's checklist
- [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: Set spark.master=local[2] for spark-shell, pyspark, and spark-sql [hudi]
Posted by "xushiyan (via GitHub)" <gi...@apache.org>.
xushiyan merged PR #14187:
URL: https://github.com/apache/hudi/pull/14187
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org