@@ -193,6 +193,16 @@ case class KyuubiConf(loadSysDefault: Boolean = true) extends Logging {
193193 cloned
194194 }
195195
196+ private lazy val serverOnlyPrefixes = get(KyuubiConf .SERVER_ONLY_PREFIXES )
197+ private lazy val serverOnlyPrefixConfigKeys = settings.keys().asScala
198+ // for ConfigEntry, respect the serverOnly flag and exclude it here
199+ .filter(key => getConfigEntry(key) == null )
200+ .filter { key =>
201+ serverOnlyPrefixes.exists { prefix =>
202+ key.startsWith(prefix)
203+ }
204+ }
205+
196206 def getUserDefaults (user : String ): KyuubiConf = {
197207 val cloned = KyuubiConf (false )
198208
@@ -205,6 +215,7 @@ case class KyuubiConf(loadSysDefault: Boolean = true) extends Logging {
205215 cloned.set(k, v)
206216 }
207217 serverOnlyConfEntries.foreach(cloned.unset)
218+ serverOnlyPrefixConfigKeys.foreach(cloned.unset)
208219 cloned
209220 }
210221
@@ -2843,6 +2854,22 @@ object KyuubiConf {
28432854 .stringConf
28442855 .createWithDefault(" ENGINE" )
28452856
2857+ val SERVER_ONLY_PREFIXES : ConfigEntry [Set [String ]] =
2858+ buildConf(" kyuubi.config.server.only.prefixes" )
2859+ .internal
2860+ .serverOnly
2861+ .doc(" A comma-separated list of prefixes for server-only configs. It's used to filter out " +
2862+ " the server-only configs to prevent passing them to the engine end. Note that, " +
2863+ " it only take affects for the configs that is not defined as a Kyuubi ConfigEntry. " +
2864+ " For example, you can exclude `kyuubi.kubernetes.28.master.address=k8s://master` by" +
2865+ " setting it to `kyuubi.kubernetes.28.`." )
2866+ .version(" 1.11.0" )
2867+ .stringConf
2868+ .toSet()
2869+ .createWithDefault(Set (
2870+ " kyuubi.backend.server.event.kafka." ,
2871+ " kyuubi.metadata.store.jdbc.datasource." ))
2872+
28462873 val ENGINE_SPARK_SHOW_PROGRESS : ConfigEntry [Boolean ] =
28472874 buildConf(" kyuubi.session.engine.spark.showProgress" )
28482875 .doc(" When true, show the progress bar in the Spark's engine log." )
0 commit comments