-
Notifications
You must be signed in to change notification settings - Fork 575
[GLUTEN-10950][VL][FOLLOWUP] Fix missing time unit in hadoop-aws time configuration (pre-3.4 versions) #11329
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d7f51db
[GLUTEN-10950][VL][FOLLOWUP] Add time unit to 'spark.hadoop.fs.s3a.co…
xumanbu 0420514
add s3aTimeConfigs for config
d7622e7
remove spark.hadoop.fs.s3a.connection.ttl & change spark.hadoop.fs.s3…
78e0796
update Reference
68f184e
update Reference
652494d
Revert "update Reference"
d2fd551
fix codestyle
b874d47
add scalastyle:off for url comment
abcebc1
remove configValue null check
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,11 +70,23 @@ class VeloxTransformerApi extends TransformerApi with Logging { | |
| override def postProcessNativeConfig( | ||
| nativeConfMap: JMap[String, String], | ||
| backendPrefix: String): Unit = { | ||
| // 'spark.hadoop.fs.s3a.connection.timeout' by velox requires time unit, hadoop-aws versions | ||
| // before 3.4 do not have time unit. | ||
| val s3sConnectionTimeout = nativeConfMap.get("spark.hadoop.fs.s3a.connection.timeout") | ||
| if (NumberUtils.isCreatable(s3sConnectionTimeout)) { | ||
| nativeConfMap.put("spark.hadoop.fs.s3a.connection.timeout", s"${s3sConnectionTimeout}ms") | ||
| // S3A configurations that require time units for Velox. | ||
| // Hadoop-aws versions before 3.3.6 do not include time units by default. | ||
| // Reference: https://hadoop.apache.org/docs/r3.3.6/hadoop-aws/tools/hadoop-aws/#General_S3A_Client_configuration | ||
| val s3aTimeConfigs = Map( | ||
| "spark.hadoop.fs.s3a.connection.timeout" -> "ms", | ||
| "spark.hadoop.fs.s3a.connection.establish.timeout" -> "ms", | ||
| "spark.hadoop.fs.s3a.threads.keepalivetime" -> "s", | ||
| "spark.hadoop.fs.s3a.multipart.purge.age" -> "s" | ||
| ) | ||
|
|
||
| s3aTimeConfigs.foreach { | ||
| case (configKey, defaultUnit) => | ||
| val configValue = nativeConfMap.get(configKey) | ||
| if (configValue != null && NumberUtils.isCreatable(configValue)) { | ||
|
||
| // Config is numeric (no unit), append the default unit for backward compatibility | ||
| nativeConfMap.put(configKey, s"$configValue$defaultUnit") | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why modify it? It should be before version 3.4. Suggestion:
Some configurations in Hadoop-aws versions before 3.4 do not include time units.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake.