Github user marmbrus commented on the pull request:
https://github.com/apache/spark/pull/3895#issuecomment-80642173
I actually question why we need this at all. As far as I understand, we
only need this function because of a bug in the way we are initializing
`TestHive` (the only place this function is used). It used to be that we call
`configure()` before creating the sessions state, but, when we refactored the
creation of the config and session state, we changed it so that it ends up
getting initialized first, then we call `configure` to setup the location of
the metastore and warehouse. This late change during initialization breaks a
bunch of things (i.e. we don't create the metastore in a temp directory
anymore) and needing to create the database manually is just a hack to work
around this (I think). Instead, we should do the following.
Change it such that `configure()` is passed the configuration explicitly
and called during setup, instead of relying on the ordering of the constructor.
Have a default no-op implementation in `HiveContext`. Override `configure` in
TestHive to do the right thing creating a fresh metastore each time it is
invoked.
---
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]