Skip to content

Conversation

@tejasapatil
Copy link
Contributor

Users unknowingly try to set core Spark configs in SQLContext but later realise that it didn't work. eg. sqlContext.sql("SET spark.shuffle.memoryFraction=0.4"). This PR adds a warning message when such operations are done.

@marmbrus
Copy link
Contributor

Thanks for working this! I'm worried that throwing an exception could break existing applications (i.e. I know for a fact that spark-sql-perf uses the conf for its own options). What about changing this to a warning?

Testing:

```
scala> sqlContext.sql("SET spark.shuffle.memoryFraction=0.4")
16/01/21 08:26:47 WARN SQLConf: Attempt to set non-Spark SQL config in SQLConf: key = spark.shuffle.memoryFraction, value = 0.4
res2: org.apache.spark.sql.DataFrame = [key: string, value: string]

scala> sqlContext.getConf("spark.shuffle.memoryFraction")
res3: String = 0.4
```
@tejasapatil
Copy link
Contributor Author

@marmbrus : Makes sense. I have updated the diff with your suggestion.

@tejasapatil
Copy link
Contributor Author

ping !!

@marmbrus
Copy link
Contributor

ok to test

@SparkQA
Copy link

SparkQA commented Jan 25, 2016

Test build #50008 has finished for PR 10849 at commit 7f1e317.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tejasapatil
Copy link
Contributor Author

Fixed scala style test

@SparkQA
Copy link

SparkQA commented Jan 26, 2016

Test build #50082 has finished for PR 10849 at commit f982d54.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tejasapatil
Copy link
Contributor Author

ping !!

@marmbrus
Copy link
Contributor

Please update the title and description (these become the commit message when merging).

@tejasapatil tejasapatil changed the title [SPARK-12926][SQL] SQLContext to disallow users passing non-sql configs [SPARK-12926][SQL] SQLContext to display warning message when non-sql configs are being set Jan 28, 2016
@tejasapatil
Copy link
Contributor Author

@marmbrus : Updated the title and description.

@marmbrus
Copy link
Contributor

Thanks, merging to master.

@marmbrus
Copy link
Contributor

Thanks, merged to master.

@asfgit asfgit closed this in 6768039 Jan 28, 2016
@tejasapatil tejasapatil deleted the SPARK-12926 branch January 28, 2016 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants