Github user erikerlandson commented on the pull request:

    https://github.com/apache/spark/pull/1689#issuecomment-55627362
  
    Hi @rxin,
    
    1) SimpleFutureAction is still referred to in submitJob method, but that 
doesn't appear to be invoked anywhere.  I was reluctant to get rid of it, as 
it's all experimental, and I could envision use cases for it.
    
    2) I see your point.  I don't currently have any clever ideas to avoid that 
scenario when it happens.
    
    3) Very interesting -- so this scenario is triggered because 
`defaultPartitioner` starts examining input RDD partitioners, which sets off 
the job when it trips over the data driven partitioning computation from 
`sortByKey`.
    
    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 
`defaultPartitioner` would then also have to return a Future, etc.  Or, even 
more generally, somehow encapsulate *all* RDD initialization in a Future, with 
the idea that these futures would finally unwind when some Action was invoked.  
    
    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.



---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to