Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14617#discussion_r109831142
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/StorageUtils.scala 
---
    @@ -35,7 +35,13 @@ import org.apache.spark.internal.Logging
      * class cannot mutate the source of the information. Accesses are not 
thread-safe.
      */
     @DeveloperApi
    -class StorageStatus(val blockManagerId: BlockManagerId, val maxMem: Long) {
    +class StorageStatus(
    +    val blockManagerId: BlockManagerId,
    +    // Explicitly adding this maxMemory field to handle maxOnHeapMem and 
maxOffHeapMem not
    +    // existing issue, this happened when trying to replay old event log.
    +    val maxMemory: Long,
    +    val maxOnHeapMem: Option[Long],
    +    val maxOffHeapMem: Option[Long]) {
    --- End diff --
    
    I find the comment you have here a little confusing.  I'd get rid of it and 
put in something more like what you have where you create the `StorageStatus` 
in `BlockManagerMasterEndpoint`, something like
    
    The onHeap and offHeap memory are always defined for new applications, but 
they can be missing if we are replaying old event logs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to