bowenliang123 commented on code in PR #5196:
URL: https://github.com/apache/kyuubi/pull/5196#discussion_r1333897810


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala:
##########
@@ -102,6 +105,27 @@ class SparkProcessBuilder(
     }
   }
 
+  override protected def engineScalaBinaryVersion: String =
+    StringUtils.defaultIfBlank(System.getenv("SPARK_SCALA_VERSION"), 
sparkCoreScalaVersion)
+
+  override lazy val homeDirFilter: FilenameFilter = {
+    if (SCALA_COMPILE_VERSION.equals("2.13")) {
+      new RegexFileFilter(
+        "^spark-(\\d+\\.\\d+\\.\\d+)-bin-hadoop\\d+-scala\\d+\\.\\d+$",
+        IOCase.INSENSITIVE)
+    } else {
+      new RegexFileFilter("^spark-\\d+\\.\\d+\\.\\d+-bin-hadoop\\d+$", 
IOCase.INSENSITIVE)

Review Comment:
   After the second thought, it's kept to check `isDirectory` but fixed to 
checks on file itself by using `FileFilter` rather than `FileNameFileter`.



-- 
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]

Reply via email to