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

Gary Helmling commented on HBASE-12493:
---------------------------------------

Looking at this issue in more detail, there are a few things wrong with our 
current means of obtaining authentication tokens:

* The User class winds up initiating RPCs, which it really shouldn't
* There's no way to do normal connection management for the 
connections/resources used by those RPCs
* The TokenProvider coprocessor setup on the server-side is wasteful

I've linked to a couple of issues I've created for the related problems.  For 
this issue, though, we can still address the problem without changing the User 
API:

# Make both User and TokenUtil classes public
# Move TokenUtil from hbase-server to hbase-client (which seems a more natural 
place for it)
# Add a method to TokenUtil to fetch a token for the given user if it is not 
already present in the user credentials
# Deprecate the User.obtainAuthTokenForJob() methods in favor of the 
TokenUtil.obtainTokenForJob() equivalents

Then, at some point in the future, we can remove the 
User.obtainAuthTokenForJob() methods entirely.


> User class should provide a way to re-use existing token
> --------------------------------------------------------
>
>                 Key: HBASE-12493
>                 URL: https://issues.apache.org/jira/browse/HBASE-12493
>             Project: HBase
>          Issue Type: Task
>            Reporter: Brock Noland
>
> In HIVE-8874 we had to re-use HBase classes market private to re-use using 
> tokens.



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

Reply via email to