You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "YE (Jira)" <ji...@apache.org> on 2023/05/11 09:22:00 UTC

[jira] [Commented] (SPARK-43454) SparkConf's get and getAllWithPrefix support variable substitution

    [ https://issues.apache.org/jira/browse/SPARK-43454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17721702#comment-17721702 ] 

YE commented on SPARK-43454:
----------------------------

I will submit a pr for this issue.

> SparkConf's get and getAllWithPrefix support variable substitution
> ------------------------------------------------------------------
>
>                 Key: SPARK-43454
>                 URL: https://issues.apache.org/jira/browse/SPARK-43454
>             Project: Spark
>          Issue Type: Improvement
>          Components: Kubernetes, Spark Core
>    Affects Versions: 3.2.4, 3.3.2, 3.4.0
>            Reporter: YE
>            Priority: Major
>
> 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:
> {code:java}
> // 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)
> {code}
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org