aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@databricks.com>2016-09-12 15:43:57 -0700
committerJosh Rosen <joshrosen@databricks.com>2016-09-12 15:43:57 -0700
commitf9c580f11098d95f098936a0b90fa21d71021205 (patch)
tree74690dc68518ff1d35f7ef5d4a9e2e471096cd70 /python
parent7c51b99a428a965ff7d136e1cdda20305d260453 (diff)
downloadspark-f9c580f11098d95f098936a0b90fa21d71021205.tar.gz
spark-f9c580f11098d95f098936a0b90fa21d71021205.tar.bz2
spark-f9c580f11098d95f098936a0b90fa21d71021205.zip
[SPARK-17485] Prevent failed remote reads of cached blocks from failing entire job
## What changes were proposed in this pull request? In Spark's `RDD.getOrCompute` we first try to read a local copy of a cached RDD block, then a remote copy, and only fall back to recomputing the block if no cached copy (local or remote) can be read. This logic works correctly in the case where no remote copies of the block exist, but if there _are_ remote copies and reads of those copies fail (due to network issues or internal Spark bugs) then the BlockManager will throw a `BlockFetchException` that will fail the task (and which could possibly fail the whole job if the read failures keep occurring). In the cases of TorrentBroadcast and task result fetching we really do want to fail the entire job in case no remote blocks can be fetched, but this logic is inappropriate for reads of cached RDD blocks because those can/should be recomputed in case cached blocks are unavailable. Therefore, I think that the `BlockManager.getRemoteBytes()` method should never throw on remote fetch errors and, instead, should handle failures by returning `None`. ## How was this patch tested? Block manager changes should be covered by modified tests in `BlockManagerSuite`: the old tests expected exceptions to be thrown on failed remote reads, while the modified tests now expect `None` to be returned from the `getRemote*` method. I also manually inspected all usages of `BlockManager.getRemoteValues()`, `getRemoteBytes()`, and `get()` to verify that they correctly pattern-match on the result and handle `None`. Note that these `None` branches are already exercised because the old `getRemoteBytes` returned `None` when no remote locations for the block could be found (which could occur if an executor died and its block manager de-registered with the master). Author: Josh Rosen <joshrosen@databricks.com> Closes #15037 from JoshRosen/SPARK-17485.
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions