Skip to content

Commit

Permalink
Modified the code like sparkConf.get(...).toBoolean to sparkConf.getB…
Browse files Browse the repository at this point in the history
…oolean(...)
  • Loading branch information
sarutak committed Dec 24, 2014
1 parent c63daa0 commit 1771430
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/SecurityManager.scala
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ private[spark] class SecurityManager(sparkConf: SparkConf) extends Logging with

private val authOn = sparkConf.getBoolean("spark.authenticate", false)
// keep spark.ui.acls.enable for backwards compatibility with 1.0
private var aclsOn = sparkConf.getOption("spark.acls.enable").getOrElse(
sparkConf.get("spark.ui.acls.enable", "false")).toBoolean
private var aclsOn =
sparkConf.getBoolean("spark.acls.enable", sparkConf.getBoolean("spark.ui.acls.enable", false))

// admin acls should be set before view or modify acls
private var adminAcls: Set[String] =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class HadoopRDD[K, V](
// used to build JobTracker ID
private val createTime = new Date()

private val shouldCloneJobConf = sc.conf.get("spark.hadoop.cloneConf", "false").toBoolean
private val shouldCloneJobConf = sc.conf.getBoolean("spark.hadoop.cloneConf", false)

// Returns a JobConf that will be used on slaves to obtain input splits for Hadoop reads.
protected def getJobConf(): JobConf = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ private[spark] object ClientBase extends Logging {
addClasspathEntry(Environment.PWD.$(), env)

// Normally the users app.jar is last in case conflicts with spark jars
if (sparkConf.get("spark.yarn.user.classpath.first", "false").toBoolean) {
if (sparkConf.getBoolean("spark.yarn.user.classpath.first", false)) {
addUserClasspath(args, sparkConf, env)
addFileToClasspath(sparkJar(sparkConf), SPARK_JAR, env)
populateHadoopClasspath(conf, env)
Expand Down

0 comments on commit 1771430

Please sign in to comment.