LamiumAmplexicaule commented on code in PR #7451: URL: https://github.com/apache/kyuubi/pull/7451#discussion_r3528420569
########## kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiReservedKeys.scala: ########## Review Comment: Thank you for your review. I added it in https://github.com/apache/kyuubi/pull/7451/changes/4bd82cf64127f36642487859be07dda994f85f6c ########## kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala: ########## @@ -214,11 +205,47 @@ case class KyuubiConf(loadSysDefault: Boolean = true) extends Logging { getAllWithPrefix(s"$USER_DEFAULTS_CONF_QUOTE${user}$USER_DEFAULTS_CONF_QUOTE", "")) { cloned.set(k, v) } - serverOnlyConfEntries.foreach(cloned.unset) - serverOnlyPrefixConfigKeys.foreach(cloned.unset) cloned } + def getEngineConf(engineType: EngineType.EngineType): Map[String, String] = { + val targetAudience = ConfigAudience.fromEngineType(engineType) + val extraServerPrefixes = get(KyuubiConf.SERVER_ONLY_PREFIXES) + + def resolveAudience(key: String): Set[ConfigAudience.Value] = { + if (KyuubiReservedKeys.reservedKeys.contains(key)) { + Set(ConfigAudience.ANY) + } else { + val entry = KyuubiConf.getConfigEntryOrAlternative(key) + if (entry != null && entry.audience.isDefined) { + entry.audience.get + } else if (extraServerPrefixes.exists(prefix => key.startsWith(prefix))) { Review Comment: Thank you for your review. I fixed it in https://github.com/apache/kyuubi/pull/7451/changes/59f09d984519b6274db05288557bd0a64afad222. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
