From 1037e0a49593817a9dd214bdfdc5b13596bb94ed Mon Sep 17 00:00:00 2001 From: hezhao2 Date: Tue, 19 Mar 2024 15:10:59 +0800 Subject: [PATCH] reformat --- .../org/apache/kyuubi/server/api/v1/AdminResource.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala index 0fe9936b365..9ad0a46c702 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala @@ -266,9 +266,11 @@ private[v1] class AdminResource extends ApiRequestContext with Logging { engineNodes.foreach { node => val nodePath = s"$engineSpace/$node" if (forceKill) { - val refIds = discoveryClient.getServiceNodesInfo(nodePath) - .flatMap(_.attributes.get("refId")) - .filter(StringUtils.isNotBlank(_)) + val refIds = node.split(";") + .flatMap(_.split("=", 2) match { + case Array("refId", value) if StringUtils.isNotBlank(value) => Some(value) + case _ => None + }) refIds.foreach(refId => { val applicationManagerInfo = ApplicationManagerInfo(