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 2019/07/22 17:19:33 UTC

[GitHub] [spark] erikerlandson commented on a change in pull request #24879: [SPARK-28042][K8S] Support using volume mount as local storage

erikerlandson 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_r305938310
 
 

 ##########
 File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/LocalDirsFeatureStep.scala
 ##########
 @@ -43,33 +44,52 @@ private[spark] class LocalDirsFeatureStep(
     val localDirVolumes = resolvedLocalDirs
       .zipWithIndex
       .map { case (localDir, index) =>
-        new VolumeBuilder()
-          .withName(s"spark-local-dir-${index + 1}")
-          .withNewEmptyDir()
-            .withMedium(if (useLocalDirTmpFs) "Memory" else null)
-          .endEmptyDir()
-          .build()
+        val name = s"spark-local-dir-${index + 1}"
+        findVolume(pod, name) match {
+          case Some(volume) => volume
+          case None =>
+            new VolumeBuilder()
+              .withName(s"spark-local-dir-${index + 1}")
 
 Review comment:
   What is the scope of visibility on volume names "spark-local-dir-1", "spark-local-dir-2" ...
   Can those names collide with volumes created by other running jobs?

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


With regards,
Apache Git Services

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