dongjoon-hyun commented on code in PR #37203:
URL: https://github.com/apache/spark/pull/37203#discussion_r950519708


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/LocalDirsFeatureStep.scala:
##########
@@ -35,9 +36,10 @@ private[spark] class LocalDirsFeatureStep(
   override def configurePod(pod: SparkPod): SparkPod = {
     var localDirs = pod.container.getVolumeMounts.asScala
       .filter(_.getName.startsWith("spark-local-dir-"))
-      .map(_.getMountPath)
+      .map(_.getMountPath).toArray

Review Comment:
   BTW, `Utils` has the following too.
   
   ```
   /**
      * Shuffle the elements of a collection into a random order, returning the
      * result in a new collection. Unlike scala.util.Random.shuffle, this 
method
      * uses a local random number generator, avoiding inter-thread contention.
      */
     def randomize[T: ClassTag](seq: TraversableOnce[T]): Seq[T] = {
       randomizeInPlace(seq.toArray)
     }
   ```



##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/LocalDirsFeatureStep.scala:
##########
@@ -35,9 +36,10 @@ private[spark] class LocalDirsFeatureStep(
   override def configurePod(pod: SparkPod): SparkPod = {
     var localDirs = pod.container.getVolumeMounts.asScala
       .filter(_.getName.startsWith("spark-local-dir-"))
-      .map(_.getMountPath)
+      .map(_.getMountPath).toArray

Review Comment:
   BTW, `Utils` has the following too.
   
   ```scala
     def randomize[T: ClassTag](seq: TraversableOnce[T]): Seq[T] = {
       randomizeInPlace(seq.toArray)
     }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to