File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed
main/scala/org/apache/spark/sql
test/scala/org/apache/spark/sql Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ class RuntimeConfig(object):
2323 """User-facing configuration API, accessible through `SparkSession.conf`.
2424
2525 Options set here are automatically propagated to the Hadoop configuration during I/O.
26- This a thin wrapper around its Scala implementation org.apache.spark.sql.RuntimeConfig.
2726 """
2827
2928 def __init__ (self , jconf ):
Original file line number Diff line number Diff line change @@ -71,9 +71,6 @@ class SparkSession(object):
7171 .config("spark.some.config.option", "some-value") \
7272 .getOrCreate()
7373
74- :param sparkContext: The :class:`SparkContext` backing this SparkSession.
75- :param jsparkSession: An optional JVM Scala SparkSession. If set, we do not instantiate a new
76- SparkSession in the JVM, instead we make all calls to this object.
7774 """
7875
7976 class Builder (object ):
Original file line number Diff line number Diff line change @@ -35,17 +35,16 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
3535 *
3636 * @since 2.0.0
3737 */
38- def set (key : String , value : String ): RuntimeConfig = {
38+ def set (key : String , value : String ): Unit = {
3939 sqlConf.setConfString(key, value)
40- this
4140 }
4241
4342 /**
4443 * Sets the given Spark runtime configuration property.
4544 *
4645 * @since 2.0.0
4746 */
48- def set (key : String , value : Boolean ): RuntimeConfig = {
47+ def set (key : String , value : Boolean ): Unit = {
4948 set(key, value.toString)
5049 }
5150
@@ -54,7 +53,7 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
5453 *
5554 * @since 2.0.0
5655 */
57- def set (key : String , value : Long ): RuntimeConfig = {
56+ def set (key : String , value : Long ): Unit = {
5857 set(key, value.toString)
5958 }
6059
Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717
18- package org .apache .spark .sql . internal
18+ package org .apache .spark .sql
1919
2020import org .apache .spark .SparkFunSuite
21- import org .apache .spark .sql .RuntimeConfig
2221
2322class RuntimeConfigSuite extends SparkFunSuite {
2423
2524 private def newConf (): RuntimeConfig = new RuntimeConfig
2625
2726 test(" set and get" ) {
2827 val conf = newConf()
29- conf
30- .set(" k1" , " v1" )
31- .set(" k2" , 2 )
32- .set(" k3" , value = false )
28+ conf.set(" k1" , " v1" )
29+ conf.set(" k2" , 2 )
30+ conf.set(" k3" , value = false )
3331
3432 assert(conf.get(" k1" ) == " v1" )
3533 assert(conf.get(" k2" ) == " 2" )
@@ -41,13 +39,15 @@ class RuntimeConfigSuite extends SparkFunSuite {
4139 }
4240
4341 test(" getOption" ) {
44- val conf = newConf().set(" k1" , " v1" )
42+ val conf = newConf()
43+ conf.set(" k1" , " v1" )
4544 assert(conf.getOption(" k1" ) == Some (" v1" ))
4645 assert(conf.getOption(" notset" ) == None )
4746 }
4847
4948 test(" unset" ) {
50- val conf = newConf().set(" k1" , " v1" )
49+ val conf = newConf()
50+ conf.set(" k1" , " v1" )
5151 assert(conf.get(" k1" ) == " v1" )
5252 conf.unset(" k1" )
5353 intercept[NoSuchElementException ] {
You can’t perform that action at this time.
0 commit comments