ulysses-you commented on code in PR #2358:
URL: https://github.com/apache/incubator-kyuubi/pull/2358#discussion_r850017231
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/hive/HiveProcessBuilder.scala:
##########
@@ -66,17 +66,26 @@ class HiveProcessBuilder(
// classpath contains hive configurations, default to hive.home/conf
classpathEntries.add(env.getOrElse("HIVE_CONF_DIR",
s"$hiveHome${File.separator}conf"))
// classpath contains hadoop configurations
- env.get("HADOOP_CONF_DIR").foreach(classpathEntries.add)
+ val hadoopConfDir = env.get("HADOOP_CONF_DIR")
+ if (hadoopConfDir.isEmpty) {
+ warn(s"HADOOP_CONF_DIR does not export.")
+ } else {
+ classpathEntries.add(hadoopConfDir.get)
+ }
env.get("YARN_CONF_DIR").foreach(classpathEntries.add)
// jars from hive distribution
classpathEntries.add(s"$hiveHome${File.separator}lib${File.separator}*")
val hadoopCp =
env.get("HIVE_HADOOP_CLASSPATH").orElse(env.get("HADOOP_CLASSPATH"))
hadoopCp.foreach(path => classpathEntries.add(s"$path${File.separator}*"))
if (hadoopCp.isEmpty) {
+ warn(s"HIVE_HADOOP_CLASSPATH or HADOOP_CLASSPATH don't export.")
mainResource.foreach { path =>
val devHadoopJars = Paths.get(path).getParent
.resolve(s"scala-$SCALA_COMPILE_VERSION")
.resolve("jars")
+ if (!Files.exists(devHadoopJars)) {
+ throw new KyuubiException(s"The path $devHadoopJars does not exists.
")
Review Comment:
what's the behavior if we do not throw the exception ?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]