hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongjun Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9732) Remove DelegationTokenIdentifier.toString() —for better logging output
Date Sat, 26 Mar 2016 17:55:25 GMT

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

Yongjun Zhang commented on HDFS-9732:
-------------------------------------

Hi [~stevel@apache.org],

Ah, sorry, thanks for your comments, I did not see until now, 

About the method name, {{detailsForCLI()}}, do we have any other occasion that we want a "frozen"
output then CLI? For example, one day we need to call the frozen version for webui? If CLI
is the only situation, I can change the new method name per your suggestion.

One question:
{quote}
here subclasses would need to know to not call super.toString() and instead call some other
method
{quote}
Derived class may have new field to print on top of the base class'. If we don't call {{super.toString()}},
we probably introduce a new method to be called by both the base class'  and child class'
{{toString()}}?

In this case, all the info printed by the base {{toString()}} is applicable to child class.
And in my rev 2, I added {{getKind()}} which is overriden by child classes. Basically we are
in full control of what the output looks like. Would you please explain why calling super.toString()
 is a bad idea (especially we do define our own base class' {{toString()}})?  I can see a
problem when we don't define {{toString()}} class for the base, in which case the java base
{{Object}}'s {{toString()}} would be called.

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)

Mime
View raw message