You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "link3280 (via GitHub)" <gi...@apache.org> on 2023/09/21 11:55:14 UTC
[GitHub] [kyuubi] link3280 commented on a diff in pull request #5316: [KYUUBI #5315][FLINK] Propagate HIVE_CONF_DIR on launching Flink engine
link3280 commented on code in PR #5316:
URL: https://github.com/apache/kyuubi/pull/5316#discussion_r1332931421
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilderSuite.scala:
##########
@@ -151,9 +157,9 @@ class FlinkProcessBuilderSuite extends KyuubiFunSuite {
matchActualAndExpectedSessionMode(builder)
}
- test("application mode - default env") {
+ test("application mode - all hadoop related environment variables are configured") {
val builder = new FlinkProcessBuilder("paullam", applicationModeConf) {
- override def env: Map[String, String] = envDefault
+ override def env: Map[String, String] = envWithAllHadoop
Review Comment:
It'd be better to add a new test with hive conf env, leaving this test with default env as a negative case to ensure compatibility with the simplest default setup.
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala:
##########
@@ -104,13 +104,27 @@ class FlinkProcessBuilder(
val userJars = conf.get(ENGINE_FLINK_APPLICATION_JARS)
userJars.foreach(jars => flinkExtraJars ++= jars.split(","))
+ val hiveConfDirOpt = env.get("HIVE_CONF_DIR")
+ hiveConfDirOpt.foreach { hiveConfDir =>
+ val hiveConfFile = Paths.get(hiveConfDir).resolve("hive-site.xml")
+ if (!Files.exists(hiveConfFile)) {
+ throw new KyuubiException(s"The file $hiveConfFile does not exists. " +
+ s"Please put hive-site.xml when HIVE_CONF_DIR env $hiveConfDir is configured.")
Review Comment:
Is it `where` instead of `when`?
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org