viirya commented on a change in pull request #25856: [SPARK-29182][Core] Cache 
preferred locations of checkpointed RDD
URL: https://github.com/apache/spark/pull/25856#discussion_r329186715
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/rdd/ReliableCheckpointRDD.scala
 ##########
 @@ -82,16 +84,37 @@ private[spark] class ReliableCheckpointRDD[T: ClassTag](
     Array.tabulate(inputFiles.length)(i => new CheckpointRDDPartition(i))
   }
 
-  /**
-   * Return the locations of the checkpoint file associated with the given 
partition.
-   */
-  protected override def getPreferredLocations(split: Partition): Seq[String] 
= {
+  // Cache of preferred locations of checkpointed files.
+  @transient private[spark] lazy val cachedPreferredLocations = 
CacheBuilder.newBuilder()
 
 Review comment:
   I have given an estimate in previous comment. For one partition, we will 
cache the number of string (hostnames) as same as the number of relicas on DFS. 
I think it is not significant.

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

Reply via email to