GitHub user viirya opened a pull request: https://github.com/apache/spark/pull/16865
[SPARK-19530][SQL] Use guava weigher for code cache eviction ## What changes were proposed in this pull request? We use guava cache to cache compiled codes for codegen. Currently we use number of entries (100 as maximum now) in the cache to determine when to evict older entries. However, the number of entries can't respond well to actually memory usage of cache entries. As we heavily rely codegen now and the generated codes can be large, we shouldn't use maximum of entries. This patch turns to use `Weigher` in guava. We use the size of bytecode as the weight of an entry. ## How was this patch tested? Jenkins tests. Please review http://spark.apache.org/contributing.html before opening a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/viirya/spark-1 use-weight-for-code-cache Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16865.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 #16865 ---- commit e6e2a8dd95512047346b939fc305dfaaef67f592 Author: Liang-Chi Hsieh <vii...@gmail.com> Date: 2017-02-09T07:18:23Z Use weight for code cache. ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org