From 61ae5f72385fce76d83aee34a6adde4a0e6d1a51 Mon Sep 17 00:00:00 2001 From: fwang12 Date: Fri, 17 Nov 2023 10:51:22 +0800 Subject: [PATCH] comment --- .../engine/KubernetesApplicationOperation.scala | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala index fca04a07f43..ae34d6542ae 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala @@ -348,16 +348,12 @@ object KubernetesApplicationOperation extends Logging { PENDING } else if (containerState.getRunning != null) { RUNNING + } else if (containerState.getTerminated == null) { + UNKNOWN + } else if (containerState.getTerminated.getExitCode == 0) { + FINISHED } else { - Option(containerState.getTerminated) match { - case Some(terminated) => - if (terminated.getExitCode == 0) { - FINISHED - } else { - FAILED - } - case None => UNKNOWN - } + FAILED } }