You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/05 10:38:57 UTC

[GitHub] [spark] ScrapCodes commented on a change in pull request #30472: [SPARK-32221][k8s] Avoid possible errors due to incorrect file size or type supplied in spark conf.

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



##########
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:
       In terms of execution, both have similar effect. Still if others also feel - that this should be moved, I can do so.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org