-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-23000] [TEST] Keep Derby DB Location Unchanged After Session Cloning #20328
Conversation
@@ -176,11 +176,16 @@ private[hive] class TestHiveSparkSession( | |||
} | |||
|
|||
{ // set the metastore temporary configuration | |||
val metastoreTempConf = HiveUtils.newTemporaryConfiguration(useInMemoryDerby = false) ++ Map( | |||
var metastoreTempConf = HiveUtils.newTemporaryConfiguration(useInMemoryDerby = false) ++ Map( | |||
ConfVars.METASTORE_INTEGER_JDO_PUSHDOWN.varname -> "true", | |||
// scratch directory used by Hive's metastore client | |||
ConfVars.SCRATCHDIR.varname -> TestHiveContext.makeScratchDir().toURI.toString, | |||
ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY.varname -> "1") |
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.
nit:
... ++ existingSharedState.map { state =>
val connKey = state.sparkContext.hadoopConfiguration.get(ConfVars.METASTORECONNECTURLKEY.varname)
ConfVars.METASTORECONNECTURLKEY.varname -> connKey
}.getOrElse(Map.empty)
LGTM |
Test build #86382 has finished for PR 20328 at commit
|
retest this please |
Test build #86378 has finished for PR 20328 at commit
|
Test build #86381 has finished for PR 20328 at commit
|
Test build #86384 has finished for PR 20328 at commit
|
thanks, merging to master/2.3! |
…oning ## What changes were proposed in this pull request? After session cloning in `TestHive`, the conf of the singleton SparkContext for derby DB location is changed to a new directory. The new directory is created in `HiveUtils.newTemporaryConfiguration(useInMemoryDerby = false)`. This PR is to keep the conf value of `ConfVars.METASTORECONNECTURLKEY.varname` unchanged during the session clone. ## How was this patch tested? The issue can be reproduced by the command: > build/sbt -Phive "hive/test-only org.apache.spark.sql.hive.HiveSessionStateSuite org.apache.spark.sql.hive.DataSourceWithHiveMetastoreCatalogSuite" Also added a test case. Author: gatorsmile <[email protected]> Closes #20328 from gatorsmile/fixTestFailure. (cherry picked from commit 6c39654) Signed-off-by: Wenchen Fan <[email protected]>
An late LGTM! :) |
What changes were proposed in this pull request?
After session cloning in
TestHive
, the conf of the singleton SparkContext for derby DB location is changed to a new directory. The new directory is created inHiveUtils.newTemporaryConfiguration(useInMemoryDerby = false)
.This PR is to keep the conf value of
ConfVars.METASTORECONNECTURLKEY.varname
unchanged during the session clone.How was this patch tested?
The issue can be reproduced by the command:
Also added a test case.