You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (Commented) (JIRA)" <ji...@apache.org> on 2011/10/01 06:04:45 UTC

[jira] [Commented] (HBASE-4515) User.getCurrent() can fail to initialize the current user

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

Hudson commented on HBASE-4515:
-------------------------------

Integrated in HBase-TRUNK #2275 (See [https://builds.apache.org/job/HBase-TRUNK/2275/])
    HBASE-4515  User.getCurrent() can fail to initialize the current user

garyh : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/security/User.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/security/TestUser.java

                
> User.getCurrent() can fail to initialize the current user
> ---------------------------------------------------------
>
>                 Key: HBASE-4515
>                 URL: https://issues.apache.org/jira/browse/HBASE-4515
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.90.4, 0.92.0, 0.94.0
>            Reporter: Jonathan Hsieh
>            Assignee: Gary Helmling
>             Fix For: 0.92.0, 0.94.0, 0.90.5
>
>         Attachments: 0001-HBASE-4515-User.getCurrent-can-cause-NPE.patch, HBASE-4515_0.90_final.patch, HBASE-4515_0.92_final.patch, HBASE-4515_trunk.patch, HBASE-4515_trunk_final.patch
>
>
> When testing with miniclusters that shutdown and are restarted, sometimes a call to User.getCurrent().getName() NPEs when attempting to restart hbase.  Oddly this happens consistently on particular branches and not on others. I don't know or understand why this happens but it has something to do with the getCurrentUGI call in  o.a.h.h.security.User.HadoopUser sometimes returning null and sometimes returning data.
> {code}
>    private HadoopUser() {
>       try {
>         ugi = (UserGroupInformation) callStatic("getCurrentUGI");
>         if (ugi == null) {
>           LOG.warn("Although successfully retrieved UserGroupInformation" 
>               + "  it was null!");
>         }
>       } catch (RuntimeException re) {
> {code}
> This patch essentially is a workaround -- it propagates the null so that clients can check and avoid the NPE.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira