[ 
https://issues.apache.org/jira/browse/HBASE-7205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502763#comment-13502763
 ] 

Adrian Muraru commented on HBASE-7205:
--------------------------------------

[[email protected]] CHecking the thread classloader would be a quick fix in the 
current implementation, however this would break the following usecase:
1. User creates a table and adds a RegionObserver CP (say 
org.mycompany.MyRegionObserver) available in say hdfs:///lib/mycp-*0.1*.jar
  (in turn, a new classloader will be cached on thread context)
2. The user updates the implementation and overwrite the COPROCESSOR att on 
table to load from a new jar (say hdfs:///lib/mycp-*0.2*.jar)
In turn, the old/cached classloader will be used to load MyRegionObserver class 
- in other ways there is no way to drop an old classloader

Though, this might be considered a corner case and documented properly


The real solution here in my mind would be to cache the classloaders keyed by 
external jar canonical path:

This would require two new methods on org.apache.hadoop.hbase.Server
1. getExternalClassLoader(String key)/
2. setExternalClassLoader(String key, ClassLoader cl)



                
> Coprocessor classloader is replicated for all regions in the HRegionServer
> --------------------------------------------------------------------------
>
>                 Key: HBASE-7205
>                 URL: https://issues.apache.org/jira/browse/HBASE-7205
>             Project: HBase
>          Issue Type: Bug
>          Components: Coprocessors
>    Affects Versions: 0.92.2, 0.94.2
>            Reporter: Adrian Muraru
>            Priority: Critical
>             Fix For: 0.96.0
>
>
> HBASE-6308 introduced a new custom CoprocessorClassLoader to load the 
> coprocessor classes and a new instance of this CL is created for each single 
> HRegion opened. This leads to OOME-PermGen when the number of regions go 
> above hundres / region server. 
> Having the table coprocessor jailed in a separate classloader is good however 
> we should create only one for all regions of a table in each HRS.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to