From 97f7987689c5567217934e9bfb2605de01d4c2ea Mon Sep 17 00:00:00 2001 From: swordy_zhao Date: Tue, 6 Feb 2024 22:00:53 +0800 Subject: [PATCH] [KYUUBI #5991] Error on reading Atlas properties composed of multi values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: Description ## Issue References ๐Ÿ”— This pull request fixes # ## Describe Your Solution ๐Ÿ”ง Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. ## Types of changes :bookmark: - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช #### Behavior Without This Pull Request :coffin: #### Behavior With This Pull Request :tada: #### Related Unit Tests --- # Checklist ๐Ÿ“ - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #5993 from SwordyZhao/fix-issues-5991. Closes #5991 827007d06 [swordy_zhao] run dev/reformat fix code style. 600363dd9 [swordy_zhao] delete scala.List,Convert a java.List to scala.List 7b000e94a [swordy_zhao] fix 5991--kyuubi failed to read atlas.rest.address 5de05764e [swordy_zhao] fix 5991--kyuubi failed to read atlas.rest.address Authored-by: swordy_zhao Signed-off-by: Cheng Pan --- .../plugin/lineage/dispatcher/atlas/AtlasClientConf.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/spark/kyuubi-spark-lineage/src/main/scala/org/apache/kyuubi/plugin/lineage/dispatcher/atlas/AtlasClientConf.scala b/extensions/spark/kyuubi-spark-lineage/src/main/scala/org/apache/kyuubi/plugin/lineage/dispatcher/atlas/AtlasClientConf.scala index 03b1a83e0e3..65063fbeb66 100644 --- a/extensions/spark/kyuubi-spark-lineage/src/main/scala/org/apache/kyuubi/plugin/lineage/dispatcher/atlas/AtlasClientConf.scala +++ b/extensions/spark/kyuubi-spark-lineage/src/main/scala/org/apache/kyuubi/plugin/lineage/dispatcher/atlas/AtlasClientConf.scala @@ -17,6 +17,10 @@ package org.apache.kyuubi.plugin.lineage.dispatcher.atlas +import java.util + +import scala.collection.JavaConverters._ + import org.apache.atlas.ApplicationProperties import org.apache.commons.configuration.Configuration import org.apache.spark.kyuubi.lineage.SparkContextHelper @@ -26,7 +30,7 @@ class AtlasClientConf(configuration: Configuration) { def get(entry: ConfigEntry): String = { configuration.getProperty(entry.key) match { case s: String => s - case l: List[_] => l.mkString(",") + case jl: util.List[_] => jl.asScala.mkString(",") case o if o != null => o.toString case _ => entry.defaultValue }