GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/14757

    [SPARK-17190] [SQL] Removal of HiveSharedState

    ### What changes were proposed in this pull request?
    Since `HiveClient` is used to interact with the Hive metastore, it should 
be hidden in `HiveExternalCatalog`. After moving `HiveClient` into 
`HiveExternalCatalog`, `HiveSharedState` becomes a wrapper of 
`HiveExternalCatalog`. Thus, removal of `HiveSharedState` becomes 
straightforward. After removal of `HiveSharedState`, the reflection logic is 
directly applied on the choice of `ExternalCatalog` types, based on the 
configuration of `CATALOG_IMPLEMENTATION`. 
    
    `HiveClient` is also used/invoked by the other entities besides 
HiveExternalCatalog, we defines the following two APIs:
    ```Scala
      /**
       * Return the existing [[HiveClient]] used to interact with the metastore.
       */
      def getClient: HiveClient
    
      /**
       * Return a [[HiveClient]] as a new session
       */
      def getNewClient: HiveClient
    ```
    
    ### How was this patch tested?
    The existing test cases

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark removeHiveClient

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14757.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14757
    
----

----


---
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]

Reply via email to