Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Dec 18, 2014

It's really a minor issue.

In ApplicationMaster, there is code like as follows.

val preserveFiles = sparkConf.get("spark.yarn.preserve.staging.files", "false").toBoolean

I think, the code can be simplified like as follows.

val preserveFiles = sparkConf.getBoolean("spark.yarn.preserve.staging.files", false)

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24578 has finished for PR 3733 at commit c63daa0.

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

@JoshRosen
Copy link
Contributor

There are a couple of other instances of the same issue; do you think we can fix those, too?

@sarutak
Copy link
Member Author

sarutak commented Dec 20, 2014

@JoshRosen I investigate how many code like SparkConf#get(..., "true/false").toBoolean by simple commands find . -name src -type d -exec grep -r '\.get(.*).*\.toBoolean' {} \; and I found following files have that issue .
I didn't investigate for HiveConf or SQLConf because those classes don't have getBoolean method.

  • HadoopRDD.scala
  • ApplicationMaster.scala
  • SecurityManager.scala
  • ClientBase.scala

Just only 4 files but it's really minor issue, so if you don't think it's needed to fix, I'l close this PR. Thanks!

@andrewor14
Copy link
Contributor

No worries. Once you make those changes I will merge this. By the way for issues as minor as this one I don't think filing a JIRA is necessary. I would just put [Minor] in the title

@sarutak sarutak changed the title [SPARK-4881] Use SparkConf#getBoolean instead of get().toBoolean [SPARK-4881][Minor] Use SparkConf#getBoolean instead of get().toBoolean Dec 24, 2014
@sarutak
Copy link
Member Author

sarutak commented Dec 24, 2014

@andrewor14 Thanks for your notifidation. I keep in mind what you mentioned.

@JoshRosen
Copy link
Contributor

LGTM; I'll pull this in as soon as Jenkins finishes. Thanks!

@SparkQA
Copy link

SparkQA commented Dec 24, 2014

Test build #24750 has finished for PR 3733 at commit 0b5e4c9.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 24, 2014

Test build #24752 has finished for PR 3733 at commit 1771430.

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

@JoshRosen
Copy link
Contributor

I've merged this into master (1.3.0). Thanks!

@asfgit asfgit closed this in 199e59a Dec 24, 2014
@sarutak sarutak deleted the SPARK-4881 branch April 11, 2015 05:24
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.

4 participants