Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/9058#discussion_r41801829
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
@@ -64,14 +64,37 @@ import org.apache.spark.util.Utils
*/
class SQLContext private[sql](
@transient val sparkContext: SparkContext,
- @transient protected[sql] val cacheManager: CacheManager)
+ @transient protected[sql] val cacheManager: CacheManager,
+ val isRootContext: Boolean)
extends org.apache.spark.Logging with Serializable {
self =>
- def this(sparkContext: SparkContext) = this(sparkContext, new
CacheManager)
+ def this(sparkContext: SparkContext) = this(sparkContext, new
CacheManager, true)
def this(sparkContext: JavaSparkContext) = this(sparkContext.sc)
+ // If spark.sql.allowMultipleContexts is true, we will throw an
exception if a user
+ // wants to create a new root SQLContext (a SLQContext that is not
created by newSession).
+ private val allowMultipleContexts =
+ sparkContext.conf.getBoolean(
+ SQLConf.ALLOW_MULTIPLE_CONTEXTS.key,
+ SQLConf.ALLOW_MULTIPLE_CONTEXTS.defaultValue.get)
--- End diff --
ah yes, SQLConf has not been populated here. nvm.
---
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]