GitHub user dongjoon-hyun opened a pull request:

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

    [SPARK-17767][SQL] Support user-provided ExternalCatalog

    ## What changes were proposed in this pull request?
    
    Currently, Spark supports ExternalCatalog, but the usage is limited to 
`HiveExternalCatalog` by using `private string` variables for class name 
holder. This PR aims to parameterize those variables as SQL configuration and 
supports `user-provided` ExternalCatalog and SessionState classes.
    
    The following is an intended use case and a snippet of test case in this PR.
    
    ```scala
    val session = SparkSession.builder()
      .master("local")
      .config("spark.sql.externalCatalog", 
"org.apache.spark.sql.MyExternalCatalog")
      .config("spark.sql.externalSessionState", 
"org.apache.spark.sql.MySessionState")
      .enableProvidedCatalog()
      .getOrCreate()
    
    assert(session.sharedState.externalCatalog.isInstanceOf[MyExternalCatalog])
    assert(session.sessionState.isInstanceOf[MySessionState])
    ```
    
    ## How was this patch tested?
    
    Pass the Jenkins test with a new test case.

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

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-17767

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

    https://github.com/apache/spark/pull/15336.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 #15336
    
----
commit d2bf71cb3c8b104e2df38a300fe1d7a224723b02
Author: Dongjoon Hyun <[email protected]>
Date:   2016-10-03T20:59:43Z

    [SPARK-17767][SQL] Support user-provided ExternalCatalog

----


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