Repository navigation
fix(gcp-spark): clarify S3A and Azure Storage batch config without _jsc - #576
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
On classic JVM `SparkSession` jobs, calling `spark.conf.set("fs.s3a.*", ...)` or
`spark.conf.set("fs.azure.*", ...)` after `.getOrCreate()` updates Spark SQL
configuration rather than the initialized `SparkContext` Hadoop `Configuration`.
Because `references/aws_s3.md` and `references/azure_storage.md` previously
framed the `_jsc.hadoopConfiguration()` ban around Spark Connect and showed only
`spark.conf.set(...)` for custom S3 endpoints and Azure Blob / OAuth examples,
standalone `.py` scripts fell back to `_jsc` or copied it from prior staging
buckets.
- Bump `gcp-spark` to `v36` in `SKILL.md` and scope the "author from scratch /
do not copy prior staging scripts" rule to **new** scripts and notebooks so
prompts modifying, upgrading, or debugging existing `gs://` scripts are
unaffected.
- Update `references/aws_s3.md` and `references/azure_storage.md` to split
standalone `.py` batch/cluster jobs (`SparkSession.builder.config(...)`
before `.getOrCreate()`), Local Python / Spark Connect notebooks
(`spark.conf.set(...)` or `ManagedSparkSession.builder.config(...)`,
dropping legacy `session_config.runtime_config.properties`), and
pre-initialized Remote Kernel notebooks (`spark.conf.set(...)` for
DataFrame/SQL reads/writes via `SessionState.newHadoopConf()`) without
`_jsc.hadoopConfiguration()`.
- Keep `spark.hadoop.fs.s3a.connection.ssl.enabled` set to `"true"` by default
in custom-endpoint examples with an inline comment noting `"false"` for
plain HTTP endpoints, and add matching standalone `.py` vs. notebook
examples for `wasbs://` and ADLS Gen2 OAuth in
`references/azure_storage.md`.
PiperOrigin-RevId: 1023764529
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(gcp-spark): clarify S3A and Azure Storage batch config without _jsc
On classic JVM
SparkSessionjobs, callingspark.conf.set("fs.s3a.*", ...)orspark.conf.set("fs.azure.*", ...)after.getOrCreate()updates Spark SQLconfiguration rather than the initialized
SparkContextHadoopConfiguration.Because
references/aws_s3.mdandreferences/azure_storage.mdpreviouslyframed the
_jsc.hadoopConfiguration()ban around Spark Connect and showed onlyspark.conf.set(...)for custom S3 endpoints and Azure Blob / OAuth examples,standalone
.pyscripts fell back to_jscor copied it from prior stagingbuckets.
gcp-sparktov36inSKILL.mdand scope the "author from scratch /do not copy prior staging scripts" rule to new scripts and notebooks so
prompts modifying, upgrading, or debugging existing
gs://scripts areunaffected.
references/aws_s3.mdandreferences/azure_storage.mdto splitstandalone
.pybatch/cluster jobs (SparkSession.builder.config(...)before
.getOrCreate()), Local Python / Spark Connect notebooks(
spark.conf.set(...)orManagedSparkSession.builder.config(...),dropping legacy
session_config.runtime_config.properties), andpre-initialized Remote Kernel notebooks (
spark.conf.set(...)forDataFrame/SQL reads/writes via
SessionState.newHadoopConf()) without_jsc.hadoopConfiguration().spark.hadoop.fs.s3a.connection.ssl.enabledset to"true"by defaultin custom-endpoint examples with an inline comment noting
"false"forplain HTTP endpoints, and add matching standalone
.pyvs. notebookexamples for
wasbs://and ADLS Gen2 OAuth inreferences/azure_storage.md.