hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kan Zhang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI
Date Mon, 08 Feb 2010 18:41:32 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-1464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831035#action_12831035

Kan Zhang commented on MAPREDUCE-1464:

> UserGroupInformation.createRemoteUser throws IllegalArgumentException if null or empty
user is passed to it.

I think createRemoteUser() should be changed to allow an empty ugi to be created. This will
save the null checking at the caller and allow method chaining. Any code that uses ugi (like
the authorize() method) should be able to deal with an empty ugi.

> In HADOOP-6510 getUser() is used. It cannot return null if the user is successfully authorized.
Any calls to getUser before the authorization is successful should check for null.

I'm not aware that the SASL layer requires username (i.e., jobId) being non-empty. We're making
a runtime assumption that jobId's won't be empty String or they won't authenticate successfully.
In my view, the less such assumptions we make, the more robust the code is.

> In JobTokenIdentifier change method getUsername to getUser which returns UGI
> ----------------------------------------------------------------------------
>                 Key: MAPREDUCE-1464
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1464
>             Project: Hadoop Map/Reduce
>          Issue Type: New Feature
>            Reporter: Jitendra Nath Pandey
>            Assignee: Jitendra Nath Pandey
>             Fix For: 0.22.0
>         Attachments: MR-1464.1.patch
> The TokenIdentifier interface has changed in HADOOP-6510. This jira tracks corresponding
change in MR. The only change is that in JobTokenIdentifier getUsername method will be changed
to getUser that will return ugi.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message