pan3793 commented on code in PR #7113:
URL: https://github.com/apache/kyuubi/pull/7113#discussion_r2166627522


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala:
##########
@@ -228,7 +228,21 @@ class FlinkProcessBuilder(
         hadoopCp.foreach(classpathEntries.add)
         val extraCp = conf.get(ENGINE_FLINK_EXTRA_CLASSPATH)
         extraCp.foreach(classpathEntries.add)
-        if (hadoopCp.isEmpty && extraCp.isEmpty) {
+
+        val flinkLibDir = Paths.get(flinkHome)
+          .resolve("lib")
+          .toFile
+
+        val hadoopJars = Option(flinkLibDir.listFiles(new FilenameFilter {
+          override def accept(dir: File, name: String): Boolean = {
+            name.toLowerCase.contains("hadoop") ||
+            name.toLowerCase.contains("flink-shaded-hadoop")
+          }
+        })).getOrElse(Array.empty)
+
+        val hasHadoopJar = hadoopJars.nonEmpty
+
+        if (!hasHadoopJar && hadoopCp.isEmpty && extraCp.isEmpty) {
           warn(s"The conf of ${FLINK_HADOOP_CLASSPATH_KEY} and " +
             s"${ENGINE_FLINK_EXTRA_CLASSPATH.key} is empty.")

Review Comment:
   update warn log too.



-- 
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-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to