[ 
https://issues.apache.org/jira/browse/HDFS-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893859#action_12893859
 ] 

Boris Shkolnik commented on HDFS-1296:
--------------------------------------

bq. 1. Token and DelegationTokenIdentifier both have a toString method. Can we 
use those instead of new stringifyToken? toString in the Token will need a fix 
not to write the password.
this is client side. On client side DTIdentifier is just a binary blob, so we 
cannot use toString().

bq. 2. In HftpFileSystem.java
+ delegationToken =
+ (Token<DelegationTokenIdentifier>) getDelegationToken(null);
+ renewer.addTokenToRenew(this);
If renewer is passed as null in getDelegationToken, the renewer thread won't be 
able to renew it.

well, looks like it is added here in GetDelegationTokenServlet:
final String renewerFinal = (renewer == null) ? 
        req.getUserPrincipal().getName() : renewer;

bq. 3. In GetDelegationTokenServlet, the new delegation token may be returned 
as null. We should check for null.
DONE

4. minor: I noticed similar code at a few places; is it possible to abstract it 
into a method, which takes scheme, hostname and port and constructs the uri?
+ sb = new StringBuilder("hdfs://");
+ sb.append(nnAddr.getHostName());
+ sb.append(":");
+ sb.append(nnPort);

DONE

> using delegation token over hftp for long running clients (spawn from 
> hdfs-1007).
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-1296
>                 URL: https://issues.apache.org/jira/browse/HDFS-1296
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Boris Shkolnik
>         Attachments: hdfs-1007-long-running-hftp-client.patch, 
> hdfs-1007-securityutil-fix.patch, HDFS-1296-13.patch, HDFS-1296-14.patch
>
>
> this patch incorporates patches 
> https://issues.apache.org/jira/secure/attachment/12446280/hdfs-1007-long-running-hftp-client.patch
> and 
> https://issues.apache.org/jira/secure/attachment/12446362/hdfs-1007-securityutil-fix.patch
> patches are attached.

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

Reply via email to