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

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

Code in the HDFS subclass
{code}
  @Override
  public String toString() {
    return getKind() + " token " + getSequenceNumber()
        + " for " + getUser().getShortUserName() + " with renewer " +
        getRenewer();
  }
{code}

compared to that in superclass
{code}
    buffer
        .append("owner=" + owner + ", renewer=" + renewer + ", realUser="
            + realUser + ", issueDate=" + issueDate + ", maxDate=" + maxDate
            + ", sequenceNumber=" + sequenceNumber + ", masterKeyId="
            + masterKeyId);
{code}

The code in {{AbstractDelegationTokenIdentifier}} is therefore a proper 
superclass of what the HDFS subclass prints. The best and simplest way to 
improve the diagnostics here is to remove the subclass's {{toString()}} method 
entirely

> DelegationTokenIdentifier.toString() to include superclass .toString() data
> ---------------------------------------------------------------------------
>
>                 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
>   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