-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48071/#review136583
-----------------------------------------------------------




lens-server/src/main/java/org/apache/lens/server/session/DatabaseResourceService.java
 (line 189)
<https://reviews.apache.org/r/48071/#comment201672>

    should be private ?



lens-server/src/main/java/org/apache/lens/server/session/LensSessionImpl.java 
(line 356)
<https://reviews.apache.org/r/48071/#comment201673>

    I feel we should not doing this everytime - almost every acquire - seems 
costly.
    
    Can we put updatedClassLoader in addResource itself ?


- Amareshwari Sriramadasu


On June 7, 2016, 12:53 p.m., Rajat Khandelwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48071/
> -----------------------------------------------------------
> 
> (Updated June 7, 2016, 12:53 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1160
>     https://issues.apache.org/jira/browse/LENS-1160
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Creating an UncloseableClassloader in DatabaseResourceService. Each db has a 
> class loader which will be uncloseable. Lens session asks db service for a 
> new classloader, which has the uncloseable classloader as parent. On session 
> close, Lens session is closing its individual class loaders per db, but will 
> leave the db class loader intact. This way we are making sure the existing 
> design remains intact. Each session sharing a common database (without 
> session jars) will have a common Uncloseable class loader. A session will 
> have classloaders per db, which will the db class loader (uncloseable) in 
> case no extra jars have been added for that db in that session, or it will be 
> a UDFClassLoader with the uncloseable db classloader as parent. This ensures 
> that classes already loaded by db class loader will not be loaded multiple 
> times by each session. Also, the lifecycle of db resource service starts with 
> lens server and ends with it too. Which means, those classloaders never need 
> to close.
> 
> 
> Diffs
> -----
> 
>   
> lens-server/src/main/java/org/apache/lens/server/session/DatabaseResourceService.java
>  1f63ed780552f921315ddee49d61495716e57227 
>   
> lens-server/src/main/java/org/apache/lens/server/session/LensSessionImpl.java 
> 2b84d3a3d93d120119e8866e53cc9aa71b75dafd 
>   
> lens-server/src/main/java/org/apache/lens/server/session/SessionClassLoader.java
>  PRE-CREATION 
>   
> lens-server/src/main/java/org/apache/lens/server/session/UncloseableClassLoader.java
>  PRE-CREATION 
>   
> lens-server/src/test/java/org/apache/lens/server/session/TestSessionClassLoaders.java
>  eeb97f2cbb5257acdacddea7048d1e806088e5cc 
> 
> Diff: https://reviews.apache.org/r/48071/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajat Khandelwal
> 
>

Reply via email to