-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-22827][SQL][FOLLOW-UP] Throw SparkOutOfMemoryError in HashAggregateExec, too.
#22969
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |
| package org.apache.spark.sql.execution.aggregate | ||
|
|
||
| import org.apache.spark.TaskContext | ||
| import org.apache.spark.memory.TaskMemoryManager | ||
| import org.apache.spark.memory.{SparkOutOfMemoryError, TaskMemoryManager} | ||
| import org.apache.spark.rdd.RDD | ||
| import org.apache.spark.sql.catalyst.InternalRow | ||
| import org.apache.spark.sql.catalyst.errors._ | ||
|
|
@@ -762,6 +762,8 @@ case class HashAggregateExec( | |
| ("true", "true", "", "") | ||
| } | ||
|
|
||
| val oomeClassName = classOf[SparkOutOfMemoryError].getName | ||
|
|
||
| val findOrInsertRegularHashMap: String = | ||
| s""" | ||
| |// generate grouping key | ||
|
|
@@ -787,7 +789,7 @@ case class HashAggregateExec( | |
| | $unsafeRowKeys, ${hashEval.value}); | ||
| | if ($unsafeRowBuffer == null) { | ||
| | // failed to allocate the first page | ||
| | throw new OutOfMemoryError("No enough memory for aggregation"); | ||
| | throw new $oomeClassName("No enough memory for aggregation"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, @ueshin . Is this the final place? If not, can we have a separate JIRA issue for this?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think so based on my investigation. I grep-ed with "OutOfMemoryError" and checked the suspicious places. |
||
| | } | ||
| |} | ||
| """.stripMargin | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opened a JIRA for banning this by a new lint rule: https://issues.apache.org/jira/browse/SPARK-25986