Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dilipbiswal committed Apr 5, 2017
1 parent 9187cca commit 1fb23cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private[spark] class TypedConfigBuilder[T](
}
}

/** Creates a [[ConfigEntry]] with a function has a default value */
/** Creates a [[ConfigEntry]] with a function to determine the default value */
def createWithDefaultFunction(defaultFunc: () => T): ConfigEntry[T] = {
val entry = new ConfigEntryWithDefaultFunction[T](parent.key, defaultFunc, converter,
stringConverter, parent._doc, parent._public)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.spark.internal.config

import java.util.TimeZone
import java.util.concurrent.TimeUnit

import org.apache.spark.{SparkConf, SparkFunSuite}
Expand Down Expand Up @@ -52,8 +51,6 @@ class ConfigEntrySuite extends SparkFunSuite {
assert(conf.get(dConf) === 20.0)
}



test("conf entry: boolean") {
val conf = new SparkConf()
val bConf = ConfigBuilder(testKey("boolean")).booleanConf.createWithDefault(false)
Expand Down Expand Up @@ -258,7 +255,7 @@ class ConfigEntrySuite extends SparkFunSuite {
test("conf entry : default function") {
var data = 0
val conf = new SparkConf()
val iConf = ConfigBuilder(testKey("int")).intConf.createWithDefaultFunction(() => data)
val iConf = ConfigBuilder(testKey("intval")).intConf.createWithDefaultFunction(() => data)
assert(conf.get(iConf) === 0)
data = 2
assert(conf.get(iConf) === 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ object SQLConf {
buildConf("spark.sql.session.timeZone")
.doc("""The ID of session local timezone, e.g. "GMT", "America/Los_Angeles", etc.""")
.stringConf
.createWithDefaultFunction(() => TimeZone.getDefault().getID())
.createWithDefaultFunction(() => TimeZone.getDefault.getID)

val WINDOW_EXEC_BUFFER_SPILL_THRESHOLD =
buildConf("spark.sql.windowExec.buffer.spill.threshold")
Expand Down

0 comments on commit 1fb23cf

Please sign in to comment.