hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7510) Tokens should use original hostname provided instead of ip
Date Mon, 26 Sep 2011 16:39:26 GMT

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

Suresh Srinivas commented on HADOOP-7510:

bq. This patch does not change the semantics of getCanonicalServiceName. It always returned
a token service until HADOOP-7661. Jitendra's altered the semantics to sometimes return a
service, sometimes return a uri. This patch was updated to change it back.
Daryn, I do not want this to distract us from making quick progress on this. However, I have
to disagree here. Here is what 7661 change made:
-   * Get a canonical name for this file system.
-   * @return a URI string that uniquely identifies this file system
+   * Get a canonical name for this file system. It returns the uri of the file
+   * system unless overridden by a FileSystem implementation. File Systems with
+   * a valid authority can choose to return host:port or ip:port.
+   * 
+   * @return A string that uniquely identifies this file system
   public String getCanonicalServiceName() {
-    return SecurityUtil.buildDTServiceName(getUri(), getDefaultPort());
+    return getUri().toString();

Looking at the javadoc of the method, there is nothing that talks about the token service
(only implementation does). All javadoc says is, it returns URI. Given a generic and vague
method name like that, you can add any description to it and it would seem okay. Granted,
getCanonicalServiceName() was added for token. However that intent could have been made really
clear by a name such as getTokenServiceName(). Some of the disagreements about this method,
in my opinion stems from the poor naming of the method.

We are compounding that by defining it with the implementation details of how token cache
is implemented (such as authority is null, then getCanonicalServiceName returns null etc.

That said, I would like to focus on getting this patch done and not drag out these discussions.

> Tokens should use original hostname provided instead of ip
> ----------------------------------------------------------
>                 Key: HADOOP-7510
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7510
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: security
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For:
>         Attachments: HADOOP-7510-10.patch, HADOOP-7510-2.patch, HADOOP-7510-3.patch,
HADOOP-7510-4.patch, HADOOP-7510-5.patch, HADOOP-7510-6.patch, HADOOP-7510-8.patch, HADOOP-7510-9.patch,
> Tokens currently store the ip:port of the remote server.  This precludes tokens from
being used after a host's ip is changed.  Tokens should store the hostname used to make the
RPC connection.  This will enable new processes to use their existing tokens.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message