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

    https://github.com/apache/spark/pull/6508#discussion_r31841700
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala 
---
    @@ -502,6 +522,8 @@ private[spark] class BlockManagerInfo(
     
       def blocks: JHashMap[BlockId, BlockStatus] = _blocks
     
    +  def cachedBlocks: mutable.HashSet[BlockId] = _cachedBlocks
    --- End diff --
    
    also, the point of using a private map and a public accessor is that the 
caller cannot mutate the underlying map. I think it makes more sense to return 
an immutable set here


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