[KYUUBI #4786] Support yarn-client and yarn-cluster for YarnApplicationOperation
### _Why are the changes needed?_ The spark master might be yarn-client and yarn-cluster ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4786 from turboFei/yarn_client_cluster. Closes #4786 accab6b81 [fwang12] Support yarn-client and yarn-cluster Authored-by: fwang12 <fwang12@ebay.com> Signed-off-by: fwang12 <fwang12@ebay.com>
This commit is contained in:
parent
dcb444e2d8
commit
07e26a85e0
@ -17,6 +17,7 @@
|
||||
|
||||
package org.apache.kyuubi.engine
|
||||
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.{ConcurrentHashMap, TimeUnit}
|
||||
|
||||
import com.google.common.cache.{Cache, CacheBuilder, RemovalNotification}
|
||||
@ -74,8 +75,7 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging {
|
||||
|
||||
override def isSupported(clusterManager: Option[String]): Boolean = {
|
||||
// TODO add deploy mode to check whether is supported
|
||||
kubernetesClient != null && clusterManager.nonEmpty &&
|
||||
clusterManager.get.toLowerCase.startsWith("k8s")
|
||||
kubernetesClient != null && clusterManager.exists(_.toLowerCase(Locale.ROOT).startsWith("k8s"))
|
||||
}
|
||||
|
||||
override def killApplicationByTag(tag: String): KillResponse = {
|
||||
|
||||
@ -17,6 +17,8 @@
|
||||
|
||||
package org.apache.kyuubi.engine
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
import scala.collection.JavaConverters._
|
||||
|
||||
import org.apache.hadoop.yarn.api.records.{FinalApplicationStatus, YarnApplicationState}
|
||||
@ -46,7 +48,7 @@ class YarnApplicationOperation extends ApplicationOperation with Logging {
|
||||
}
|
||||
|
||||
override def isSupported(clusterManager: Option[String]): Boolean = {
|
||||
yarnClient != null && clusterManager.nonEmpty && "yarn".equalsIgnoreCase(clusterManager.get)
|
||||
yarnClient != null && clusterManager.exists(_.toLowerCase(Locale.ROOT).startsWith("yarn"))
|
||||
}
|
||||
|
||||
override def killApplicationByTag(tag: String): KillResponse = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user