Uh oh!
There was an error while loading. Please reload this page.
[SPARK-1021] Defer the data-driven computation of partition bounds in so... - #1689
[SPARK-1021] Defer the data-driven computation of partition bounds in so...#1689erikerlandson wants to merge 7 commits into
Conversation
AmplabJenkins
commented
Jul 31, 2014
Can one of the admins verify this patch? |
JoshRosen
commented
Jul 31, 2014
Jenkins, this is ok to test. |
SparkQA
commented
Jul 31, 2014
QA tests have started for PR 1689. This patch merges cleanly. |
SparkQA
commented
Jul 31, 2014
QA results for PR 1689: |
There was a problem hiding this comment.
Can we perhaps make this thread safe?
SparkQA
commented
Aug 7, 2014
QA tests have started for PR 1689. This patch merges cleanly. |
SparkQA
commented
Aug 7, 2014
QA results for PR 1689: |
There was a problem hiding this comment.
Do we not want to deserialize valRB if it is not null? Are you worried rangeBounds might be called while the deserialization is happening?
There was a problem hiding this comment.
also was assuming readObject might be called in multiple threads. Can that happen?
erikerlandson
commented
Aug 15, 2014
Latest push updates RangePartition sampling job to be async, and updates the async action functions so that they will properly enclose the sampling job induced by calling 'partitions'. |
SparkQA
commented
Aug 15, 2014
QA tests have started for PR 1689 at commit
|
markhamstra
commented
Aug 15, 2014
Excellent! I'll try to find some time to review this soon. |
SparkQA
commented
Aug 15, 2014
QA tests have finished for PR 1689 at commit
|
SparkQA
commented
Aug 16, 2014
QA tests have started for PR 1689 at commit
|
SparkQA
commented
Aug 16, 2014
QA tests have finished for PR 1689 at commit
|
SparkQA
commented
Sep 5, 2014
Can one of the admins verify this patch? |
… sortByKey() until evaluation.
…ePartitioner sampling job properly
f3448e4 to
50b6da6Comparerxin
commented
Sep 12, 2014
Jenkins, test this please. |
SparkQA
commented
Sep 12, 2014
QA tests have started for PR 1689 at commit
|
rxin
commented
Sep 12, 2014
@erikerlandson thanks for looking at this. A few questions:
c.parallelize(1 to 1000).map(x => (x, x)).sortByKey().join(sc.parallelize(1 to 10).map(x=>(x,x))) |
SparkQA
commented
Sep 12, 2014
QA tests have finished for PR 1689 at commit
|
erikerlandson
commented
Sep 15, 2014
Hi @rxin,
My impression is that this whack-a-mole with non-laziness stems from a combination of (a) a data-dependent partitioner(s), with (b) methods that refer to input partitioners as part of the construction of new RDDs. It might be possible to thread some design changes around so that references to partitioning are consistently encapsulated in a Future. Functions such as However it seems (imo) outside the scope of this particular Jira/PR. Maybe we could start another umbrella Jira to track possible solutions along these lines. Another orthogonal thought -- you can short circuit all this by providing a partitioner instead of forcing it to be computed from data. That's not as sexy, or widely applicable, as some deeper fix to the problem, but users can do it now as a workaround when it's feasible. |
erikerlandson
commented
Sep 15, 2014
Or, maybe just look into playing the same game with the cogrouped RDDs that I did with sortByKey. Don't get into invoking |
rxin
commented
Sep 16, 2014
Yea I don't think we need to fully solve 3 here. My main concern with these set of changes is 2, since a single badly behaved RDD can potentially block the (unfortunately single threaded) scheduler forever. Let me think about this a little bit and get back to you. If you have an idea about how to fix that, feel free to suggest them. |
erikerlandson
commented
Sep 16, 2014
So far the best idea I have for (2) is to set some kind of time-out on the evaluation. The bound computation uses subsampling that will (when all goes well) cap the computation at constant time(*). If the timeout triggers, some sub-optimal falback for partitioning might be used. Or just fail the entire evaluation. (*) more accurately, constant number of samples. the time required could depend on various things. |
rxin
commented
Sep 27, 2014
Actually I looked at it again. I don't think it would block the scheduler because we compute partitions outside the scheduler thread. This approach looks good to me! |
rxin
commented
Sep 27, 2014
@erikerlandson i'm going to merge this first. Maybe we can do the cleanup later. |
rxin
commented
Sep 27, 2014
BTW one thing that would be great to add is a test that makes sure we don't block the main dag scheduler thread. The reason I think we don't block is that we call rdd.partitions.length in submitJob: /** * Submit a job to the job scheduler and get a JobWaiter object back. The JobWaiter object * can be used to block until the the job finishes executing or can be used to cancel the job.*/defsubmitJob[T, U](
rdd: RDD[T],
func: (TaskContext, Iterator[T]) =>U,
partitions: Seq[Int],
callSite: CallSite,
allowLocal: Boolean,
resultHandler: (Int, U) =>Unit,
properties: Properties=null):JobWaiter[U] =
{
// Check to make sure we are not launching a task on a partition that does not exist.valmaxPartitions= rdd.partitions.length |
markhamstra
commented
Sep 27, 2014
Have either of you thought about how to coordinate this with Josh's work on SPARK-3626? #2482 |
marmbrus
commented
Sep 29, 2014
Since this PR was merged the correlationoptimizer14 test has been hanging. We might want to consider rolling back. You can reproduce the problem as follows: |
rxin
commented
Sep 29, 2014
I reverted this commit. @erikerlandson mind taking a look at this problem? |
erikerlandson
commented
Sep 29, 2014
erikerlandson
commented
Nov 3, 2014
@marmbrus, FWIW, the Not sure why, but running |
…apache#1689) We’ve added checkAllStateStoreProviders for Dedisco project to allow checking all state stores which is a debugging feature. One thing we recently discussed with Dedisco project is, the time spent on such check is not counted by reportTimeTaken which can be observed in stream progress later.
...rtByKey() until evaluation.