HeartSaVioR commented on a change in pull request #29509:
URL: https://github.com/apache/spark/pull/29509#discussion_r475392003



##########
File path: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -1214,8 +1214,8 @@ private[history] class FsHistoryProvider(conf: SparkConf, 
clock: Clock)
     // Use InMemoryStore to rebuild app store
     while (hybridStore == null) {
       // A RuntimeException will be thrown if the heap memory is not sufficient
-      memoryManager.lease(appId, attempt.info.attemptId, reader.totalSize,

Review comment:
       Previous code looks consistent with HistoryDiskManager. Let's leave it 
as it is.
   
   If we really want to make the approximate memory calculation be separate and 
be exposed to others, I guess it no longer needs to be class method. It may be 
method of the util object, which also contain the approximate disk usage as 
well. Probably better to do it in separate PR if you think it looks to be a 
good change.




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