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

Ivan A. Veselovsky commented on MAPREDUCE-4764:
-----------------------------------------------

Hi, Daryn,
regarding your suggestion about UGI.getCurrebntUser(): 
if inside the job I execute the following code:
{noformat}
      final UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
      final Collection<Token<? extends TokenIdentifier>> ugiTokenCollection = 
ugi.getTokens();
      for (Token t: ugiTokenCollection) {
        System.out.println("UGI token: [" + t + "]");
      }
{noformat}
, i receive the following output: 
{noformat}
UGI token: [Kind: HDFS_DELEGATION_TOKEN, Service: 127.0.0.1:52538, Ident: 
(HDFS_DELEGATION_TOKEN token 1 for ivan)]
UGI token: [Kind: mapreduce.job, Service: 172.18.128.36:59358, Ident: 
(org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier@3f56e5ed)]
{noformat}

So, are we revealing an implementation bug, or our expectation is wrong?
                
> repair test org.apache.hadoop.mapreduce.security.TestBinaryTokenFile
> --------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4764
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4764
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Ivan A. Veselovsky
>         Attachments: MAPREDUCE-4764-trunk.patch
>
>
> the test is @Ignore-ed, and fails being enabled.
> Suggested to repair it to fill the coverage gap.
> Problems fixed in the test: 
> (1) MRConfig.FRAMEWORK_NAME and YarnConfiguration.RM_PRINCIPAL properties 
> must be correctly set in the configuration to correctly enable the security 
> in the way this test implies. 
> (2) The property MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY now is not 
> passed into the Job configuration -- it is intentionally deleted from there. 
> So, we pass the binary file name in another dedicated property. 
> (3) The test was using deprecated cluster classes. All them are updated to 
> the modern analogs.
> (4) The delegation token found in the job context is now correctly compared 
> to the one deserialized from the binary file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to