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

Steve Loughran commented on HDFS-9732:
--------------------------------------

bq. audit every direct and indirect usage of toString to make sure it isn't 
getting used for CLI output

that'd take forever. Better to go from CLI entry points and their outputs.

b) the javadoc for the toString method needs to explicitly say that it is not 
to be used for CLI output because it evolves and point to the relevant section 
in the compat guidelines

Maybe the compat guidelines say "toString() is flexible", but {{toStringCLI(}} 
is frozen. Make that an interface too for easy tracking down of use. You could 
also have a special {{println(ToStringCLI instance)}} which would call and 
print it.

bq. c) the toStringFrozen should be renamed toStringCLI or something similar to 
actually state what it does not what it is so that in 3.x it can be changed.

+1

> Remove DelegationTokenIdentifier.toString() —for better logging output
> ----------------------------------------------------------------------
>
>                 Key: HDFS-9732
>                 URL: https://issues.apache.org/jira/browse/HDFS-9732
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.7.2
>            Reporter: Steve Loughran
>            Assignee: Yongjun Zhang
>         Attachments: HADOOP-12752-001.patch, HDFS-9732-000.patch, 
> HDFS-9732.001.patch, HDFS-9732.002.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> HDFS {{DelegationTokenIdentifier.toString()}} adds some diagnostics info, 
> owner, sequence number. But its superclass,  
> {{AbstractDelegationTokenIdentifier}} contains a lot more information, 
> including token issue and expiry times.
> Because  {{DelegationTokenIdentifier.toString()}} doesn't include this data,
> information that is potentially useful for kerberos diagnostics is lost.



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

Reply via email to