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

Sergey Shelukhin commented on HADOOP-13066:
-------------------------------------------

Yeah, this is the method. Class lock doesn't protect across several method 
calls. See my example above...
Thread 1 callls loginUserFromKeytab("hdfs", ...)
Thread 2 calls loginUserFromKeytab("hbase", ...)
Thread 1 calls getLoginUser and will get loginUser hbase.

> UserGroupInformation.loginWithKerberos/getLoginUser is not thread-safe
> ----------------------------------------------------------------------
>
>                 Key: HADOOP-13066
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13066
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>
> When calling loginFromKerberos, a static variable is set up with the result. 
> If someone logs in as a different user from a different thread, the call to 
> getLoginUser will not return the correct UGI.



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

Reply via email to