-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23514] Use SessionState.newHadoopConf() to propage hadoop configs set in SQLConf. #20679
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
Conversation
|
cc @gatorsmile @rxin @liancheng suggested stripping the "spark.hadoop" prefix to have more compatibility with users specifying or not specifying that prefix. |
| val newHadoopConf = new Configuration(hadoopConf) | ||
| sqlConf.getAllConfs.foreach { case (k, v) => if (v ne null) newHadoopConf.set(k, v) } | ||
| sqlConf.getAllConfs.foreach { case (k, v) => | ||
| if (v ne null) newHadoopConf.set(k, v.stripPrefix("spark.hadoop")) |
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.
Could we add a test case for this feature?
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.
I just reverted this part, it's not really related to the rest.
|
Test build #87675 has finished for PR 20679 at commit
|
|
Test build #87730 has finished for PR 20679 at commit
|
|
jenkins retest this please |
|
Retest this please. |
|
Test build #87733 has finished for PR 20679 at commit
|
|
retest this please |
|
Test build #87738 has finished for PR 20679 at commit
|
|
retest this please |
|
Test build #87753 has finished for PR 20679 at commit
|
|
retest this please |
|
jenkins retest this please |
|
Test build #87774 has finished for PR 20679 at commit
|
gatorsmile
left a comment
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.
LGTM
|
Thanks! Merged to master. |
…Configuration directly ## What changes were proposed in this pull request? In #20679 I missed a few places in SQL tests. For hygiene, they should also use the sessionState interface where possible. ## How was this patch tested? Modified existing tests. Author: Juliusz Sompolski <[email protected]> Closes #20718 from juliuszsompolski/SPARK-23514-followup.
… configs set in SQLConf. apache#20679 A few places in spark-sql were using sc.hadoopConfiguration directly. They should be using sessionState.newHadoopConf() to blend in configs that were set through SQLConf. Also, for better UX, for these configs blended in from SQLConf, we should consider removing the spark.hadoop prefix, so that the settings are recognized whether or not they were specified by the user.
… configs set in SQLConf. apache#20679 A few places in spark-sql were using sc.hadoopConfiguration directly. They should be using sessionState.newHadoopConf() to blend in configs that were set through SQLConf. Also, for better UX, for these configs blended in from SQLConf, we should consider removing the spark.hadoop prefix, so that the settings are recognized whether or not they were specified by the user.
What changes were proposed in this pull request?
A few places in
spark-sqlwere usingsc.hadoopConfigurationdirectly. They should be usingsessionState.newHadoopConf()to blend in configs that were set throughSQLConf.Also, for better UX, for these configs blended in from
SQLConf, we should consider removing thespark.hadoopprefix, so that the settings are recognized whether or not they were specified by the user.How was this patch tested?
Tested that AlterTableRecoverPartitions now correctly recognizes settings that are passed in to the FileSystem through SQLConf.