Skip to content

Commit

Permalink
[SPARK-47552][CORE][FOLLOWUP] Set spark.hadoop.fs.s3a.connection.esta…
Browse files Browse the repository at this point in the history
…blish.timeout to numeric

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

This is a followup of apache#45710 . Some custom `FileSystem` implementations read the `hadoop.fs.s3a.connection.establish.timeout` config as numeric, and do not support the `30s` syntax. To make it safe, this PR proposes to set this conf to `30000` instead of `30s`. I checked the doc page and this config is milliseconds.

### Why are the changes needed?

more compatible with custom `FileSystem` implementations.

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

no

### How was this patch tested?

manual

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

no

Closes apache#46874 from cloud-fan/follow.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
  • Loading branch information
cloud-fan committed Jun 6, 2024
1 parent 31ce2db commit 966c3d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class SparkContext(config: SparkConf) extends Logging {
}
// HADOOP-19097 Set fs.s3a.connection.establish.timeout to 30s
// We can remove this after Apache Hadoop 3.4.1 releases
conf.setIfMissing("spark.hadoop.fs.s3a.connection.establish.timeout", "30s")
conf.setIfMissing("spark.hadoop.fs.s3a.connection.establish.timeout", "30000")
// This should be set as early as possible.
SparkContext.fillMissingMagicCommitterConfsIfNeeded(_conf)

Expand Down

0 comments on commit 966c3d9

Please sign in to comment.