dongjoon-hyun 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_r327463401
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/rdd/ReliableCheckpointRDD.scala
 ##########
 @@ -82,14 +83,28 @@ private[spark] class ReliableCheckpointRDD[T: ClassTag](
     Array.tabulate(inputFiles.length)(i => new CheckpointRDDPartition(i))
   }
 
+  // Cache of preferred locations of checkpointed files.
+  private[spark] val cachedPreferredLocations: mutable.HashMap[Int, 
Seq[String]] =
+    mutable.HashMap.empty
 
 Review comment:
   ? The above is HDFS NN status. Not Spark.
   When the job starts, this PR will cache `A1, A2, A3` and will not update it 
due to the following, right?
   ```
   if (cachePreferrredLoc && cachedPreferredLocations.contains(split.index)) {
   ```
   
   When do you think Spark get the new `Bx`?
   
   For example, when the long running task is assigned to A2, then A2 die. 
Then, Spark will retry with A3 and will run. Then, A3 dies. At the 3rd try, 
Spark still only knows `A1, A2, A3` not `B1, B2, B3`? Did I understand 
correctly?

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