Github user mridulm commented on a diff in the pull request:
https://github.com/apache/spark/pull/887#discussion_r13062854
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -772,7 +772,7 @@ private[spark] class BlockManager(
/**
* Replicate block to another node.
*/
- var cachedPeers: Seq[BlockManagerId] = null
+ @volatile var cachedPeers: Seq[BlockManagerId] = null
--- End diff --
Which is private to spark iirc ?
But agreed about incorrect assumption.
Doing it cleanly is much more involved than just going to master for
various replication levels and caching that per level ... We would need a
block placement spi like what NN exposes
On 27-May-2014 10:51 am, "Aaron Davidson" <[email protected]> wrote:
> In core/src/main/scala/org/apache/spark/storage/BlockManager.scala:
>
> > @@ -772,7 +772,7 @@ private[spark] class BlockManager(
> > /**
> > * Replicate block to another node.
> > */
> > - var cachedPeers: Seq[BlockManagerId] = null
> > + @volatile var cachedPeers: Seq[BlockManagerId] = null
>
> Spark should not be making assumptions about the replication level like
> that. StorageLevel has a fully public apply() to construct new ones.
>
> â
> Reply to this email directly or view it on
GitHub<https://github.com/apache/spark/pull/887/files#r13062499>
> .
>
---
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.
---