[
https://issues.apache.org/jira/browse/HIVE-13561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15272843#comment-15272843
]
Vaibhav Gumashta commented on HIVE-13561:
-----------------------------------------
[~tleftwich] Your changes to Registry.java look good. The initial part of your
test case, where before an add jar you are ensuring that the cache size is 0
looks good. The part where you are ensuring that after an add jar the size of
cache is > 0 also looks good. However, we're still unable to validate whether
the cache is indeed purging expired entries.
I see that in ReflectionUtil, the cache is inititalized like this:
{code}
private static final Cache<Class<?>, Constructor<?>> CONSTRUCTOR_CACHE =
CacheBuilder.newBuilder().expireAfterAccess(15,
TimeUnit.MINUTES).concurrencyLevel(64).weakKeys().weakValues().build();
{code}
In the test case, we could probably do the following:
1. Initialize the CONSTRUCTOR_CACHE to expire entries after 5 seconds (using
reflection to access it from the test case)
2. In the test case do an add jar & sleep for more than 5 seconds
3. Use cacheAfterAddJar = getReflectionUtilCacheSize() and assert that the
value is indeed 0.
What do you think?
> HiveServer2 is leaking ClassLoaders when add jar / temporary functions are
> used
> -------------------------------------------------------------------------------
>
> Key: HIVE-13561
> URL: https://issues.apache.org/jira/browse/HIVE-13561
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2
> Affects Versions: 1.2.0, 1.2.1, 2.0.0
> Reporter: Trystan Leftwich
> Assignee: Trystan Leftwich
> Attachments: HIVE-13561-branch-1.2.3.patch, HIVE-13561.2.patch,
> HIVE-13561.3.patch
>
>
> I can repo this on branch-1.2 and branch-2.0.
> It looks to be the same issues as: HIVE-11408
> The patch from HIVE-11408 looks to fix the issue as well.
> I've updated the patch from HIVE-11408 to be aligned with branch-1.2 and
> master
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)