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

Szehon Ho commented on HIVE-12270:
----------------------------------

I comment on the review board, lets go with original patch.

I studied the code a little bit after our discussion, seems like if we just use 
raw MSC like I suggest to avoid caching Hive object, then if I understand it 
right we will never close it if DbTokenStore is invoked by thrift threads.. 
whereas Hive object does have a static close call later in the thread's life, 
or it will get closed when Hive.get() is invoked with another conf.

So I'll +1 on patch1, it sucks to have to cache and pass the Hive object as its 
designed to be thread-local, but it's better than risking HMS leaks.  I'm not 
sure a better way, any thoughts are welcome.  In this case, we are sure there's 
no concurrency problem like HIVE-13002 as we are only using the Hive's MSC.

Sorry for wasting the time.. I would attach patch1 with thrift to trigger 
HiveQA for you but I guess its deleted.

> Add DBTokenStore support to HS2 delegation token
> ------------------------------------------------
>
>                 Key: HIVE-12270
>                 URL: https://issues.apache.org/jira/browse/HIVE-12270
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-12270.1.nothrift.patch, HIVE-12270.1.patch, 
> HIVE-12270.nothrift.patch
>
>
> DBTokenStore was initially introduced by HIVE-3255 in Hive-0.12 and it is 
> mainly for HMS delegation token. Later in Hive-0.13, the HS2 delegation token 
> support was introduced by HIVE-5155 but it used MemoryTokenStore as token 
> store. That the HIVE-9622 uses the shared RawStore (or HMSHandler) to access 
> the token/keys information in HMS DB directly from HS2 seems not the right 
> approach to support DBTokenStore in HS2. I think we should use 
> HiveMetaStoreClient in HS2 instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to