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

    https://github.com/apache/spark/pull/6508#discussion_r31844440
  
    --- 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 --
    
    what I meant was change the return type to an immutable set; we can just 
return the underlying mutable set without cloning it. The point is just to 
discourage users of cached blocks from mutating it (they still can if they 
want, but they need to cast it first)


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