diff options
author | Josh Rosen <joshrosen@databricks.com> | 2016-01-27 13:27:32 -0800 |
---|---|---|
committer | Yin Huai <yhuai@databricks.com> | 2016-01-27 13:27:32 -0800 |
commit | 32f741115bda5d7d7dbfcd9fe827ecbea7303ffa (patch) | |
tree | 88500d064baca2afd53b07c62708c93b0087611a /NOTICE | |
parent | 87abcf7df921a5937fdb2bae8bfb30bfabc4970a (diff) | |
download | spark-32f741115bda5d7d7dbfcd9fe827ecbea7303ffa.tar.gz spark-32f741115bda5d7d7dbfcd9fe827ecbea7303ffa.tar.bz2 spark-32f741115bda5d7d7dbfcd9fe827ecbea7303ffa.zip |
[SPARK-13021][CORE] Fail fast when custom RDDs violate RDD.partition's API contract
Spark's `Partition` and `RDD.partitions` APIs have a contract which requires custom implementations of `RDD.partitions` to ensure that for all `x`, `rdd.partitions(x).index == x`; in other words, the `index` reported by a repartition needs to match its position in the partitions array.
If a custom RDD implementation violates this contract, then Spark has the potential to become stuck in an infinite recomputation loop when recomputing a subset of an RDD's partitions, since the tasks that are actually run will not correspond to the missing output partitions that triggered the recomputation. Here's a link to a notebook which demonstrates this problem: https://rawgit.com/JoshRosen/e520fb9a64c1c97ec985/raw/5e8a5aa8d2a18910a1607f0aa4190104adda3424/Violating%2520RDD.partitions%2520contract.html
In order to guard against this infinite loop behavior, this patch modifies Spark so that it fails fast and refuses to compute RDDs' whose `partitions` violate the API contract.
Author: Josh Rosen <joshrosen@databricks.com>
Closes #10932 from JoshRosen/SPARK-13021.
Diffstat (limited to 'NOTICE')
0 files changed, 0 insertions, 0 deletions