-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-31522][SQL] Hive metastore client initialization related configurations should be static #28302
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
…gurations should be static
|
cc: @cloud-fan @dongjoon-hyun @HyukjinKwon, many thanks. |
|
Test build #121635 has finished for PR 28302 at commit
|
|
Test build #121634 has finished for PR 28302 at commit
|
|
Test build #121644 has finished for PR 28302 at commit
|
|
Test build #121652 has finished for PR 28302 at commit
|
|
Test build #121650 has finished for PR 28302 at commit
|
|
retest this please |
|
Test build #121658 has finished for PR 28302 at commit
|
|
Test build #121668 has finished for PR 28302 at commit
|
|
thanks, merging to master/3.0! cc @juliuszsompolski as well. |
…gurations should be static
### What changes were proposed in this pull request?
HiveClient instance is cross-session, the following configurations which are defined in HiveUtils and used to create it should be considered static:
1. spark.sql.hive.metastore.version - used to determine the hive version in Spark
2. spark.sql.hive.metastore.jars - hive metastore related jars location which is used by spark to create hive client
3. spark.sql.hive.metastore.sharedPrefixes and spark.sql.hive.metastore.barrierPrefixes - package names of classes that are shared or separated between SparkContextLoader and hive client class loader
Those are used only once when creating the hive metastore client. They should be static in SQLConf for retrieving them correctly. We should avoid them being changed by users with SET/RESET command.
Speaking of spark.sql.hive.version - the fake of the spark.sql.hive.metastore.version, it is used by jdbc/thrift client for backward compatibility.
### Why are the changes needed?
bugfix, these configurations should not be changed.
### Does this PR introduce any user-facing change?
Yes, the following set of configs are not allowed to change.
```
Seq("spark.sql.hive.metastore.version ",
"spark.sql.hive.metastore.jars",
"spark.sql.hive.metastore.sharedPrefixes",
"spark.sql.hive.metastore.barrierPrefixes")
```
### How was this patch tested?
add unit test
Closes #28302 from yaooqinn/SPARK-31522.
Authored-by: Kent Yao <yaooqinn@hotmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 8dc2c02)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
|
+1, late LGTM. |
What changes were proposed in this pull request?
HiveClient instance is cross-session, the following configurations which are defined in HiveUtils and used to create it should be considered static:
Those are used only once when creating the hive metastore client. They should be static in SQLConf for retrieving them correctly. We should avoid them being changed by users with SET/RESET command.
Speaking of spark.sql.hive.version - the fake of the spark.sql.hive.metastore.version, it is used by jdbc/thrift client for backward compatibility.
Why are the changes needed?
bugfix, these configurations should not be changed.
Does this PR introduce any user-facing change?
Yes, the following set of configs are not allowed to change.
How was this patch tested?
add unit test