jaceklaskowski commented on a change in pull request #30472:
URL: https://github.com/apache/spark/pull/30472#discussion_r551818647



##########
File path: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientUtils.scala
##########
@@ -156,11 +162,8 @@ private[spark] object KubernetesClientUtils extends 
Logging {
     }
     val confFiles: Seq[File] = {
       val dir = new File(confDir)
-      if (dir.isDirectory) {
-        dir.listFiles.filter(x => fileFilter(x)).toSeq
-      } else {
-        Nil
-      }
+      assert(dir.isDirectory, "Spark conf should be a directory.")

Review comment:
       nit: move this assertion up so it's caught early (at least around line 
135). I also think it should be `IllegalArgumentException` instead.




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

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