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/04/29 03:16:24 UTC
[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag
yaooqinn commented on code in PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#discussion_r861436628
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KyuubiApplicationManager.scala:
##########
@@ -78,7 +78,9 @@ class KyuubiApplicationManager extends AbstractService("KyuubiApplicationManager
def getApplicationInfo(
clusterManager: Option[String],
tag: String): Option[Map[String, String]] = {
- operations.find(_.isSupported(clusterManager)).map(_.getApplicationInfoByTag(tag))
+ operations.find(_.isSupported(clusterManager)).flatMap { m =>
Review Comment:
Nit:
```scala
val option = operations.find(_.isSupported(clusterManager))
option match {
case Some(op) => Option(op.getApplicationInfoByTag(tag))
case None => None
}
```
--
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