GitHub user andrewor14 opened a pull request:

    https://github.com/apache/spark/pull/9209

    [SPARK-11251] Fix page size calculation in local mode

    ```
    // My machine only has 8 cores
    $ bin/spark-shell --master local[32]
    scala> val df = sc.parallelize(Seq((1, 1), (2, 2))).toDF("a", "b")
    scala> df.as("x").join(df.as("y"), $"x.a" === $"y.a").count()
    
    Caused by: java.io.IOException: Unable to acquire 2097152 bytes of memory
        at 
org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.acquireNewPage(UnsafeExternalSorter.java:351)
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andrewor14/spark fix-local-page-size

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9209.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #9209
    
----
commit 0e140c2c46d76711b7c858bed4f96a560f08d842
Author: Andrew Or <[email protected]>
Date:   2015-10-08T21:13:49Z

    Fix page size in local mode
    
    Instead of always using Runtime.getRuntime.availableProcessors
    for the page size, we should respect the number of slots specified
    by the driver, e.g. local[32]. Note that this commit only fixes
    the issue for local modes.

commit d0fc050c61e413f7274e9ad745a08b69b1d02cbf
Author: Andrew Or <[email protected]>
Date:   2015-10-22T00:32:23Z

    Merge branch 'master' of github.com:apache/spark into fix-local-page-size

----


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