Merge pull request #273 from rxin/top

Fixed a performance problem in RDD.top and BoundedPriorityQueue

BoundedPriority was actually traversing the entire queue to calculate the size, resulting in bad performance in insertion.

This should also cherry pick cleanly into branch-0.8.

(cherry picked from commit f4effb375e93993be1777ebb423c100ea8422f24)
Signed-off-by: Reynold Xin <rxin@apache.org>
Handle IndirectTaskResults in LocalScheduler
Fixed test failure by adding exception to abortion msg
Merge pull request #281 from kayousterhout/local_indirect_fix

Handle IndirectTaskResults in LocalScheduler

This fixes a bug where large results aren't correctly handled when running in local mode.  Not doing this in master because expecting the Local/Cluster scheduler consolidation to go into 0.9, which will fix this issue (see #127)
Merge pull request #320 from kayousterhout/erroneous_failed_msg

Remove erroneous FAILED state for killed tasks.

Currently, when tasks are killed, the Executor first sends a
status update for the task with a "KILLED" state, and then
sends a second status update with a "FAILED" state saying that
the task failed due to an exception. The second FAILED state is
misleading/unncessary, and occurs due to a NonLocalReturnControl
Exception that gets thrown due to the way we kill tasks. This
commit eliminates that problem.

I'm not at all sure that this is the best way to fix this problem,
so alternate suggestions welcome. @rxin guessing you're the right
person to look at this.

(cherry picked from commit 0475ca8f81b6b8f21fdb841922cd9ab51cfc8cc3)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge branch 'branch-0.8' of https://github.com/apache/incubator-spark into branch-0.8
Add collectPartition to JavaRDD interface.
Also remove takePartition from PythonRDD and use collectPartition in rdd.py.

Conflicts:
	core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala
	python/pyspark/context.py
	python/pyspark/rdd.py
Make collectPartitions take an array of partitions
Change the implementation to use runJob instead of PartitionPruningRDD.
Also update the unit tests and the python take implementation
to use the new interface.
Add comment explaining collectPartitions's use