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 2022/08/20 07:43:39 UTC

[GitHub] [spark] pralabhkumar commented on a diff in pull request #37203: [SPARK-39755][K8S] Randomization in Spark local directory for K8 resource managers

pralabhkumar commented on code in PR #37203:
URL: https://github.com/apache/spark/pull/37203#discussion_r950664130


##########
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/LocalDirsFeatureStepSuite.scala:
##########
@@ -52,41 +52,58 @@ class LocalDirsFeatureStepSuite extends SparkFunSuite {
   }
 
   test("Use configured local dirs split on comma if provided.") {

Review Comment:
   @dongjoon-hyun  After randomization , this test case will fail , since this test case is always expecting 
   ```
   assert(configuredPod.container.getVolumeMounts.get(0) ===
         new VolumeMountBuilder()
           .withName(s"spark-local-dir-1")
           .withMountPath("/var/data/my-local-dir-1")
           .build())
   ```
   
   which is not true always since , locations are randomized.  Also  test case is expecting env variable as always 
   /var/data/my-local-dir-1,/var/data/my-local-dir-2 which is not true after randomization. 
   
   ```
   assert(configuredPod.container.getEnv.get(0) ===
         new EnvVarBuilder()
           .withName("SPARK_LOCAL_DIRS")
           .withValue("/var/data/my-local-dir-1,/var/data/my-local-dir-2")
           .build())
   ```
   
   Therefore have changed the test case to take care of randomization. 
   
   



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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