Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

andrewor14
Copy link
Contributor

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

Andrew Or added 2 commits October 8, 2015 14:13
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.
@andrewor14
Copy link
Contributor Author

@JoshRosen @rxin

@davies
Copy link
Contributor

davies commented Oct 22, 2015

LGTM

@SparkQA
Copy link

SparkQA commented Oct 22, 2015

Test build #44109 has finished for PR 9209 at commit d0fc050.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 22, 2015

Test build #1935 has finished for PR 9209 at commit d0fc050.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * class BinaryClassificationEvaluator @Since(\"1.4.0\") (@Since(\"1.4.0\") override val uid: String)\n * class MulticlassClassificationEvaluator @Since(\"1.5.0\") (@Since(\"1.5.0\") override val uid: String)\n * final class RegressionEvaluator @Since(\"1.4.0\") (@Since(\"1.4.0\") override val uid: String)\n * case class ClassEncoder[T](\n * case class First(child: Expression, ignoreNullsExpr: Expression) extends DeclarativeAggregate\n * case class Last(child: Expression, ignoreNullsExpr: Expression) extends DeclarativeAggregate\n * case class First(\n * case class FirstFunction(\n * case class Last(\n * case class LastFunction(\n * case class CreateRow(children: Seq[Expression]) extends Expression\n * abstract class ColumnarIterator extends Iterator[InternalRow]\n * class SpecificColumnarIterator extends $\n

@SparkQA
Copy link

SparkQA commented Oct 22, 2015

Test build #1936 has finished for PR 9209 at commit d0fc050.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Oct 22, 2015

Seems like there is a real failure?

@andrewor14
Copy link
Contributor Author

What do you mean? It failed a flaky test LauncherBackendSuite. Let's retest this please

@SparkQA
Copy link

SparkQA commented Oct 22, 2015

Test build #44172 has finished for PR 9209 at commit d0fc050.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Oct 22, 2015

I've merged this.

asfgit pushed a commit that referenced this pull request Oct 22, 2015
```
// 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)
```

Author: Andrew Or <andrew@databricks.com>

Closes #9209 from andrewor14/fix-local-page-size.

(cherry picked from commit 34e71c6)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@asfgit asfgit closed this in 34e71c6 Oct 22, 2015
@andrewor14 andrewor14 deleted the fix-local-page-size branch October 22, 2015 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants