GitHub user tashoyan opened a pull request:
https://github.com/apache/spark/pull/19700
[SPARK-22471][SQL] SQLListener consumes much memory causing OutOfMemoryError
## What changes were proposed in this pull request?
This PR addresses the issue
[SPARK-22471](https://issues.apache.org/jira/browse/SPARK-22471). The modified
version of `SQLListener` respects the setting `spark.ui.retainedStages` and
keeps the number of the tracked stages within the specified limit. The hash map
`_stageIdToStageMetrics` does not outgrow the limit, hence overall memory
consumption does not grow with time anymore.
## How was this patch tested?
A new unit test covers this fix - see `SQLListenerMemorySuite.scala`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tashoyan/spark SPARK-22471
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19700.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 #19700
----
commit 0388f6ce50d568a0493e7959ec005ee5afc20bd0
Author: Arseniy Tashoyan <[email protected]>
Date: 2017-11-08T15:41:36Z
Add reproducer for the issue SPARK-22471
commit 42e80272cf0926f0fd978e6b7617685987d8fc93
Author: Arseniy Tashoyan <[email protected]>
Date: 2017-11-08T15:41:54Z
Add fix for the issue SPARK-22471
commit 2f793ad1f001bc58dd09fa4eaec6ae423445f86f
Author: Arseniy Tashoyan <[email protected]>
Date: 2017-11-08T20:39:02Z
Remove debug print and irrelevant checks. Add a reference to the issue.
commit 4780d95b7d58df741eb8d5756c8109fc7dbfb457
Author: Arseniy Tashoyan <[email protected]>
Date: 2017-11-08T20:47:44Z
Remove debug print and irrelevant checks. Add a reference to the issue.
commit 79c83a715d4a36ad00ff3888e8e2953fcc163d17
Author: Arseniy Tashoyan <[email protected]>
Date: 2017-11-08T21:21:42Z
Collect memory-related tests on SQLListener in the same suite
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]