Github user liancheng commented on the pull request:
https://github.com/apache/spark/pull/2352#issuecomment-55365014
Hmm... I couldn't reproduce the `HiveQuerySuite` failure, but I can
steadily reproduce similar failure with `StatisticsSuite`, and your patch does
fixes this one.
Just to make sure I understand this correctly: so the `RESET` command
resets all Hive configurations to their default value, including
`javax.jdo.option.ConnectionURL` and `hive.metastore.warehouse.dir`. And in the
case of `TestHiveContext`, default value of these two properties are
respectively:
- `jdbc:derby:;databaseName=metastore_db;create=true`, and
- `/user/hive/warehouse`
which overrides the random temporary directories specified by
`TestHiveContext`. Then, when [this
line](https://github.com/apache/spark/blame/42904b8d013e71d03e301c3da62e33b4cc2eb54e/sql/hive/src/main/scala/org/apache/spark/sql/hive/TestHive.scala#L389)
gets executed, we try to find the "default" database from the wrong place and
thus causes the "default" database missing error.
The weird thing is that this part of code has existed for a long time (ever
since Spark SQL became part of Spark), but it never fails :( While debugging
this "default" database missing issue, I also observed that some race
conditions and execution order related issue, which maybe the reason that this
bug has been covered for so long a time...
Anyway, this PR LGTM. Thanks for fixing this!
@marmbrus Let's see whether this can bring our Maven build on Jenkins back!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]