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

Yongjun Zhang edited comment on HDFS-9732 at 3/26/16 9:29 PM:
--------------------------------------------------------------

Thanks [~aw]. 

I like your idea of checking over all places about the use of {{toString()}} in 
CLI outputs. However, I think we can do it in separate jira as a master jira. 
And let each subtask fix some related commands, or even fix one particular 
issue (like this one). It would be really ambitious to use one jira to cover 
all IMHO. But good thing is, we are aware of that this has been an 
long-standing issue based on the discussion here, and we need keep this issue 
in mind when reviewing jiras that may incur output incompatibility.

About method naming. Wonder if we can do {{toStringFrozen()}} or 
{{toStringStable()}} and javadoc it as "stable API for backward compatibility, 
currently only for CLI"? I can see that if we put the {{CLI}} keyword in the 
name, then calling these methods for anything else would look awkward, I guess 
there is still chance of calling these methods for something else. 

The point we are trying to make is, *the method need to stable*, and do not 
change it otherwise compatibility will be broken; and it's *not just* because 
they are for CLI. For example, some methods called by CLI don't need to be 
stable at all.

Probably we use name {{toStringStable()}} instead?

Thanks.

 


was (Author: yzhangal):
Thanks [~aw]. 

I like your idea of checking over all places about the use of {{toString()}} in 
CLI outputs. However, I think we can do it in separate jira as a master jira. 
And let each subtask fix some related commands, or even fix one particular 
issue (like this one). It would be really ambitious to use one jira to cover 
all IMHO. But good thing is, we are aware of that this has been issue for long 
based on the discussion here.

About method naming. Wonder if we can do {{toStringFrozen()}} or 
{{toStringStable()}} and javadoc it as "stable API for backward compatibility, 
currently only for CLI"? I can see that if we put the {{CLI}} keyword in the 
name, then calling these methods for anything else would look awkward, I guess 
there is still chance of calling these methods for something else. 

The point we are trying to make is, *the method need to stable*, and do not 
change it otherwise compatibility will be broken; and it's *not just* because 
they are for CLI. For example, some methods called by CLI don't need to be 
stable at all.

Probably we use name {{toStringStable()}} instead?

Thanks.

 

> 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.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