[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-08 Thread Kan Zhang (JIRA)

[ 
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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-07 Thread Hudson (JIRA)

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

Hudson commented on MAPREDUCE-1464:
---

Integrated in Hadoop-Mapreduce-trunk-Commit #229 (See 
[http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/229/])
. Makes a compatible change in JobTokenIdentifier to account for 
HADOOP-6510. Contributed by Jitendra Nath Pandey.


> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-06 Thread Jitendra Nath Pandey (JIRA)

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

Jitendra Nath Pandey commented on MAPREDUCE-1464:
-

tests, javac, javadoc and findbugs for this patch were run manually.

> 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
> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-06 Thread Devaraj Das (JIRA)

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

Devaraj Das commented on MAPREDUCE-1464:


+1

> 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
> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-06 Thread Jitendra Nath Pandey (JIRA)

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

Jitendra Nath Pandey commented on MAPREDUCE-1464:
-

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. Updated the patch in HADOOP-6510 to handle 
null returned by getUser before authorization is successful.

> 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
> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-05 Thread Jitendra Nath Pandey (JIRA)

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

Jitendra Nath Pandey commented on MAPREDUCE-1464:
-

UserGroupInformation.createRemoteUser throws IllegalArgumentException if null 
or empty user is passed to it. Therefore UGI with empty user cannot be 
constructed. 

I need to revisit HADOOP-6510 patch for the possibility of null returned by 
getUser()

> 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
> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-05 Thread Kan Zhang (JIRA)

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

Kan Zhang commented on MAPREDUCE-1464:
--

I looked at the patch again and found that there is no null checking at the 
caller (per your HADOOP-6510.21.patch). I suggestion you return an empty ugi 
instead of null for getUser() method (do the same in HDFS-935) to reduce the 
chance of NullPointerException at runtime.

> 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
> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-05 Thread Kan Zhang (JIRA)

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

Kan Zhang commented on MAPREDUCE-1464:
--

Btw, it would be good if you add a JavaDoc saying this method may return null.

> 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
> 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.



[jira] Commented: (MAPREDUCE-1464) In JobTokenIdentifier change method getUsername to getUser which returns UGI

2010-02-05 Thread Kan Zhang (JIRA)

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

Kan Zhang commented on MAPREDUCE-1464:
--

+1, pending hudson.

> 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
> 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.