GitHub user jerryshao opened a pull request:
https://github.com/apache/spark/pull/16382
[SPARK-18975][Core] Add an API to remove SparkListener
## What changes were proposed in this pull request?
In current Spark we could add customized SparkListener through
`SparkContext#addListener` API, but there's no equivalent API to remove the
registered one. In our scenario SparkListener will be added repeatedly
accordingly to the changed environment. If lacks the ability to remove
listeners, there might be many registered listeners finally, this is
unnecessary and potentially affects the performance. So here propose to add an
API to remove registered listener.
## How was this patch tested?
Add an unit test to verify it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jerryshao/apache-spark SPARK-18975
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16382.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 #16382
----
commit 347bb0e74e16cf19511ccfa3ed763db71c57aa4f
Author: jerryshao <[email protected]>
Date: 2016-12-22T07:28:41Z
Add an API to remove SparkListener
Change-Id: I6aa47c9276866b20ad53dc04b6d11d299a30e690
----
---
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]