You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/08/29 06:45:14 UTC

[GitHub] [incubator-kyuubi] cxzl25 commented on a diff in pull request #3354: Support to get engine id, name, url in KyuubiConnection

cxzl25 commented on code in PR #3354:
URL: https://github.com/apache/incubator-kyuubi/pull/3354#discussion_r956948071


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala:
##########
@@ -164,8 +169,14 @@ class KyuubiSyncThriftClient private (
     ThriftUtils.verifyTStatus(resp.getStatus)
     _remoteSessionHandle = resp.getSessionHandle
     _engineId = Option(resp.getConfiguration)
-      .filter(_.containsKey("kyuubi.engine.id"))
-      .map(_.get("kyuubi.engine.id"))
+      .filter(_.containsKey(KYUUBI_ENGINE_ID))
+      .map(_.get(KYUUBI_ENGINE_ID))
+    _engineName = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_NAME))
+      .map(_.get(KYUUBI_ENGINE_NAME))
+    _engineUrl = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_URL))
+      .map(_.get(KYUUBI_ENGINE_URL))

Review Comment:
   Here filter and map seem a bit redundant, get should be enough.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org