Skip to content

Commit 91a54b6

Browse files
committed
prefix
followup save fix NO
1 parent 2021574 commit 91a54b6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ 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
196+
private lazy val serverOnlyPrefixes: Set[String] = get(KyuubiConf.SERVER_ONLY_PREFIXES)
197+
private lazy val serverOnlyPrefixConfigKeys: Set[String] = settings.keys().asScala
198198
// for ConfigEntry, respect the serverOnly flag and exclude it here
199199
.filter(key => getConfigEntry(key) == null)
200200
.filter { key =>
201201
serverOnlyPrefixes.exists { prefix =>
202202
key.startsWith(prefix)
203203
}
204-
}
204+
}.toSet
205205

206206
def getUserDefaults(user: String): KyuubiConf = {
207207
val cloned = KyuubiConf(false)

kyuubi-common/src/test/scala/org/apache/kyuubi/config/KyuubiConfSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,10 @@ class KyuubiConfSuite extends KyuubiFunSuite {
231231
Some("/var/run/secrets/kubernetes.io/token.ns2"))
232232
}
233233

234-
test("KYUUBI #7053 - Support to exclude server only configs with prefixes") {
234+
test("KYUUBI #7055 - Support to exclude server only configs with prefixes") {
235235
val kyuubiConf = KyuubiConf(false)
236236
kyuubiConf.set("kyuubi.backend.server.event.kafka.broker", "localhost:9092")
237237
assert(kyuubiConf.getUserDefaults("kyuubi").getAll.size == 0)
238+
assert(kyuubiConf.getUserDefaults("user").getAll.size == 0)
238239
}
239240
}

0 commit comments

Comments
 (0)