spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <>
Subject [GitHub] spark pull request: [SPARK-11042] [SQL] Add a mechanism to ban cre...
Date Mon, 12 Oct 2015 20:56:14 GMT
Github user cloud-fan commented on a diff in the pull request:
    --- 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(
    +  // 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.defaultValue.get)
    --- End diff --
    We can use `conf.getConf(SQLConf.ALLOW_MULTIPLE_CONTEXTS)` here.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message