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

Konstantin Shvachko commented on HADOOP-13206:
----------------------------------------------

This looks reasonable. Minor suggestion to check {{if (serviceMatch)}} first 
and return. Then you don't need to check {{if (!serviceMatch)}}. Like this:
{code}
        boolean serviceMatch = service.equals(token.getService());
        if (serviceMatch) {
          return (Token<TokenIdent>) token;
        }
        try {
          serviceMatch = 
NetUtils.createSocketAddr(token.getService().toString()).
              equals(NetUtils.createSocketAddr(service.toString()));
        } catch (IllegalArgumentException e) {
        ........
{code}
Also as per Jenkins build, I did not find any whitespace violations, may be you 
will see, but checkstyle is probably complaining about one long line.

> Delegation token cannot be fetched and used by different versions of client
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-13206
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13206
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.3.0, 2.6.1
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>         Attachments: HADOOP-13206.00.patch, HADOOP-13206.01.patch, 
> HADOOP-13206.02.patch
>
>
> We have observed that an HDFS delegation token fetched by a 2.3.0 client 
> cannot be used by a 2.6.1 client, and vice versa. Through some debugging I 
> found that it's a mismatch between the token's {{service}} and the 
> {{service}} of the filesystem (e.g. {{webhdfs://host.something.com:50070/}}). 
> One would be in numerical IP address and one would be in non-numerical 
> hostname format.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to