[ 
https://issues.apache.org/jira/browse/HBASE-7205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrian Muraru updated HBASE-7205:
---------------------------------

    Attachment: 7205-v5.txt

Ted, patch v5 also checks in TestClassLoading#testClassLoadingFromHDFS that all 
HRegions CPH are actually re-using cached classloaders. That is, all 4 regions 
should load the CPs from two classloaders only(two jars)

This check spotted actually an issue in the activeClassLoader registration - we 
did it only when the classloader is firstly created - should be whenever the 
classloader is successfully used to load a CP.
Patch v5 also contains a fix for this.

As for 
1. static void clearCacheForTesting();
2. static int getClassloaderCountForTesting(Path path);

Do you think we need them ? I wouldn't add them and use 
CoprocessorHost.classLoadersCache reference instead. (TestClassLoading is in 
the same package as CPH so can access package level attributes). Personally, I 
am not a big fan of adding methods used solely in tests :)

                
> 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
>            Assignee: Ted Yu
>            Priority: Critical
>             Fix For: 0.96.0, 0.94.4
>
>         Attachments: 7205-v1.txt, 7205-v3.txt, 7205-v4.txt, 7205-v5.txt, 
> HBASE-7205_v2.patch
>
>
> 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