Github user scwf commented on the pull request:

    https://github.com/apache/spark/pull/6006#issuecomment-102730578
  
    HiveContext use derby as the metastore database defaultly which only 
support single instance for one metastore path.
    
    I think you need config the ```javax.jdo.option.ConnectionURL``` before 
creating the HiveContext
    you can change getorcreate like this:
    ```
      def getOrCreate(sparkContext: SparkContext, config: Map[String, String] = 
Map.empty): HiveContext   = {
        INSTANTIATION_LOCK.synchronized {
          if (lastInstantiatedContext.get() == null) {
            new HiveContext(sparkContext) {
              override def configure(): Map[String, String] = config
            }
          }
        }
        lastInstantiatedContext.get()
      }
    ```
    
    then when you create hivecontext in HiveContextSuite, you can configure it 
like this
    ```
        val hiveContext = HiveContext.getOrCreate(testSparkContext, 
HiveContext.newTemporaryConfiguration)
    
    ```



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