hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-6364) HiveServer2 - Request serving thread should get class loader from existing SessionState
Date Tue, 18 Mar 2014 16:55:45 GMT

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

Ashutosh Chauhan commented on HIVE-6364:
----------------------------------------

Although, HIVE-3969 is marked as duplicate, I don't think it is a duplicate. This one fixes
the problem of having right class loader for a thread serving the query, whereas HIVE-3969
talks about unloading registered jars. So, it seems there are two independent problem, both
of which needs to be fixed.
[~jaideepdhok] would you like to rebase your patch.

> HiveServer2 - Request serving thread should get class loader from existing SessionState
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-6364
>                 URL: https://issues.apache.org/jira/browse/HIVE-6364
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Jaideep Dhok
>         Attachments: HIVE-6364.1.patch
>
>
> SessionState is created for each session in HS2. If we do any add jars, a class loader
is set in the SessionState's conf object. This class loader should also be set in each thread
that serves request of the same session.
> Scenario (both requests are in the same session)-
> {noformat}
> // req 1
> add jar foo.jar // Served by thread th1, this updates class loader and sets in SessionState.conf
> // req2 served by th2, such that th1 != th2
> CREATE TEMPORARY FUNCTION foo_udf AS 'some class in foo.jar' 
> // This can throw class not found error, because although 
> // the new thread (th2) gets the same session state as th1,
> // the class loader is different (Thread.currentThread.getContextClassLoader()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message