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

SparkConf's get and getAllWithPrefix support variable substitution

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.4, 3.3.2, 3.4.0
    • None
    • Kubernetes, Spark Core
    • None

    Description

      After SPARK-16272:

      variable substitution is available for `ConfigEntry`s, this creates some confusion for get conf directly vs get conf from ConfigEntry. For example:

      // suppose spark.a=${env:var_a} is set in sparkConf, and it's defined as a ConfigEntry as CONFIG_ENTRY_A
      
      // this would return ${env:var_a}
      val a = sparkConf.get("spark.a") 
      
      // this would return the value of var_a in the current JVM process
      val configA = sparkConf.get(CONFIG_ENTRY_A)
      
      

      I'd like to propose that we should support variable substitution for get config directly.

       

      I noticed this problem when running spark applications on k8s, and noticed some substitutions are not work as expected. For k8s particularly, it uses getAllWithPrefix extensively, which also suffers this problem

      Attachments

        Activity

          People

            Unassigned Unassigned
            advancedxy YE
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: