diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/hive/HiveYarnModeProcessBuilderSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/hive/HiveYarnModeProcessBuilderSuite.scala index 04f7abe47f1..7c896309c5a 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/hive/HiveYarnModeProcessBuilderSuite.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/hive/HiveYarnModeProcessBuilderSuite.scala @@ -19,13 +19,15 @@ package org.apache.kyuubi.engine.hive import org.apache.kyuubi.KyuubiFunSuite import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.engine.deploy.yarn.EngineYarnModeSubmitter.{KYUUBI_ENGINE_DEPLOY_YARN_MODE_HADOOP_CONF_KEY, KYUUBI_ENGINE_DEPLOY_YARN_MODE_HIVE_CONF_KEY, KYUUBI_ENGINE_DEPLOY_YARN_MODE_YARN_CONF_KEY} +import org.apache.kyuubi.engine.hive.HiveProcessBuilder.HIVE_HADOOP_CLASSPATH_KEY class HiveYarnModeProcessBuilderSuite extends KyuubiFunSuite { test("hive yarn mode process builder") { val conf = KyuubiConf().set("kyuubi.on", "off") val builder = new HiveYarnModeProcessBuilder("kyuubi", conf, "") { - override def env: Map[String, String] = super.env + ("HIVE_CONF_DIR" -> "/etc/hive/conf") + override def env: Map[String, String] = + super.env + ("HIVE_CONF_DIR" -> "/etc/hive/conf") + (HIVE_HADOOP_CLASSPATH_KEY -> "/hadoop") } val commands = builder.toString.split('\n') assert(commands.head.contains("bin/java"), "wrong exec") @@ -39,7 +41,9 @@ class HiveYarnModeProcessBuilderSuite extends KyuubiFunSuite { test("hadoop conf dir") { val conf = KyuubiConf().set("kyuubi.on", "off") val builder = new HiveYarnModeProcessBuilder("kyuubi", conf, "") { - override def env: Map[String, String] = super.env + ("HADOOP_CONF_DIR" -> "/etc/hadoop/conf") + override def env: Map[String, String] = + super.env + ("HADOOP_CONF_DIR" -> "/etc/hadoop/conf") + + (HIVE_HADOOP_CLASSPATH_KEY -> "/hadoop") } assert(builder.toString.contains( s"--conf $KYUUBI_ENGINE_DEPLOY_YARN_MODE_HADOOP_CONF_KEY=/etc/hadoop/conf")) @@ -49,7 +53,8 @@ class HiveYarnModeProcessBuilderSuite extends KyuubiFunSuite { val conf = KyuubiConf().set("kyuubi.on", "off") val builder = new HiveYarnModeProcessBuilder("kyuubi", conf, "") { override def env: Map[String, String] = - super.env + ("YARN_CONF_DIR" -> "/etc/hadoop/yarn/conf") + super.env + ("YARN_CONF_DIR" -> "/etc/hadoop/yarn/conf") + + (HIVE_HADOOP_CLASSPATH_KEY -> "/hadoop") } assert(builder.toString.contains( s"--conf $KYUUBI_ENGINE_DEPLOY_YARN_MODE_YARN_CONF_KEY=/etc/hadoop/yarn/conf"))