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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]