vanzin commented on a change in pull request #24879: [SPARK-28042][K8S] Support
using volume mount as local storage
URL: https://github.com/apache/spark/pull/24879#discussion_r307399418
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/LocalDirsFeatureStep.scala
##########
@@ -66,10 +76,22 @@ private[spark] class LocalDirsFeatureStep(
val containerWithLocalDirVolumeMounts = new ContainerBuilder(pod.container)
.addNewEnv()
.withName("SPARK_LOCAL_DIRS")
- .withValue(resolvedLocalDirs.mkString(","))
+ .withValue(localDirs.mkString(","))
.endEnv()
.addToVolumeMounts(localDirVolumeMounts: _*)
.build()
SparkPod(podWithLocalDirVolumes, containerWithLocalDirVolumeMounts)
}
+
+ def findLocalDirVolumeMount(pod: SparkPod): Seq[String] = {
+ val localDirVolumes = pod.pod.getSpec.getVolumes.asScala
+ .filter(v => v.getName.startsWith("spark-local-dir-"))
Review comment:
nit: either:
.filter { v => ... }
or
.filter(_.getName()...)
Also in a few places below.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]