Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-4881

Use SparkConf#getBoolean instead of get().toBoolean

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.3.0
    • 1.3.0
    • YARN
    • None

    Description

      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)
      

      Attachments

        Activity

          People

            sarutak Kousuke Saruta
            sarutak Kousuke Saruta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: