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



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala
##########
@@ -148,6 +149,38 @@ trait ProcBuilder {
     proc
   }
 
+  def execKillYarnJob(appId: String): Int = {
+    val hadoopHomeOpt = env.get("HADOOP_HOME").orElse {
+      throw KyuubiSQLException(s"Failed to kill yarn job. HADOOP_HOME is not 
set! " +
+        "For more detail information on installing and configuring Yarn, 
please visit " +
+        "https://kyuubi.apache.org/docs/stable/deployment/on_yarn.html";)
+    }.map { hadoopHome =>
+      Paths.get(hadoopHome, "bin", 
"yarn").toAbsolutePath.toFile.getCanonicalPath
+    }.get
+    val command = hadoopHomeOpt + " application -kill " + appId

Review comment:
       This way makes more sense to me, because it's doesn't require setting up 
hadoop client in Kyuubi machine, and specific versions of hadoop client jars.




-- 
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