Skip to content

Commit

Permalink
[SPARK-13659] Refactor BlockStore put*() APIs to remove returnValues
Browse files Browse the repository at this point in the history
In preparation for larger refactoring, this patch removes the confusing `returnValues` option from the BlockStore put() APIs: returning the value is only useful in one place (caching) and in other situations, such as block replication, it's simpler to put() and then get().

As part of this change, I needed to refactor `BlockManager.doPut()`'s block replication code. I also changed `doPut()` to access the memory and disk stores directly rather than calling them through the BlockStore interface; this is in anticipation of a followup patch to remove the BlockStore interface so that the disk store can expose a binary-data-oriented API which is not concerned with Java objects or serialization.

These changes should be covered by the existing storage unit tests. The best way to review this patch is probably to look at the individual commits, all of which are small and have useful descriptions to guide the review.

/cc davies for review.

Author: Josh Rosen <[email protected]>

Closes apache#11502 from JoshRosen/remove-returnvalues.
  • Loading branch information
JoshRosen authored and Andrew Or committed Mar 8, 2016
1 parent 017cdf2 commit e52e597
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 273 deletions.
Loading

0 comments on commit e52e597

Please sign in to comment.