GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/19718

    [SPARK-19644][SQL] Clean up Scala reflection garbage after creating Encoder 
(branch-2.2)

    ## What changes were proposed in this pull request?
    
    Backport #19687 to branch-2.2. The major difference is 
`cleanUpReflectionObjects` is protected by `ScalaReflectionLock.synchronized` 
in this PR for Scala 2.10.
    
    ## How was this patch tested?
    
    Jenkins

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark SPARK-19644-2.2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/19718.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 #19718
    
----
commit 7bff354873bb236d4c2855e9247dffb89cc2f259
Author: Shixiong Zhu <zsxw...@gmail.com>
Date:   2017-11-10T19:27:28Z

    [SPARK-19644][SQL] Clean up Scala reflection garbage after creating Encoder
    
    Because of the memory leak issue in `scala.reflect.api.Types.TypeApi.<:<` 
(https://github.com/scala/bug/issues/8302), creating an encoder may leak memory.
    
    This PR adds `cleanUpReflectionObjects` to clean up these leaking objects 
for methods calling `scala.reflect.api.Types.TypeApi.<:<`.
    
    The updated unit tests.
    
    Author: Shixiong Zhu <zsxw...@gmail.com>
    
    Closes #19687 from zsxwing/SPARK-19644.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to