dongjoon-hyun commented on a change in pull request #31876:
URL: https://github.com/apache/spark/pull/31876#discussion_r618070271



##########
File path: core/src/main/scala/org/apache/spark/scheduler/MapStatus.scala
##########
@@ -52,8 +55,41 @@ private[spark] sealed trait MapStatus {
    * partitionId of the task or taskContext.taskAttemptId is used.
    */
   def mapId: Long
+
 }
 
+private[spark] class MapStatusLocationFactory(conf: SparkConf) {
+  private val locationExtension = classOf[Location]
+  private val (locationConstructor, locationName) = {
+    conf.get(config.SHUFFLE_LOCATION_PLUGIN_CLASS).map { className =>
+      val clazz = Utils.classForName(className)
+      require(locationExtension.isAssignableFrom(clazz),
+        s"$className is not a subclass of ${locationExtension.getName}.")
+      (clazz.getConstructor(), className)
+    }.orNull
+  }
+
+  private lazy val locationCache: LoadingCache[Location, Location] = 
CacheBuilder.newBuilder()
+    .maximumSize(10000)

Review comment:
       1. Is it enough by design?
   2. Shall we make a conf for this? Otherwise, we may add that conf after we 
hit some issue in the future.




-- 
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:
us...@infra.apache.org



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

Reply via email to