ulysses-you commented on a change in pull request #1119:
URL: https://github.com/apache/incubator-kyuubi/pull/1119#discussion_r724652350



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala
##########
@@ -148,6 +149,26 @@ trait ProcBuilder {
     proc
   }
 
+  val YARN_APP_NAME_REGEX: Regex = "application_\\d+_\\d+".r
+
+  def killApplication(line: String = lastRowOfLog): String =
+    YARN_APP_NAME_REGEX.findFirstIn(line) match {
+      case Some(appId) =>
+        val pb = new ProcessBuilder("/bin/sh",
+          System.getProperty("user.dir") + "/bin/stop-application.sh", appId)

Review comment:
       Use `sys.env.get(KYUUBI_HOME)` and skip killing application if 
`KYUUBI_HOME` is none. `user.dir` is not reliable.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to