HDFS-9085. Show renewer information in DelegationTokenIdentifier#toString. Contributed by Zhihai Xu.
This commit is contained in:
parent
c32614f410
commit
4f6e842ba9
|
@ -61,7 +61,8 @@ public class DelegationTokenIdentifier
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getKind() + " token " + getSequenceNumber()
|
return getKind() + " token " + getSequenceNumber()
|
||||||
+ " for " + getUser().getShortUserName();
|
+ " for " + getUser().getShortUserName() + " with renewer " +
|
||||||
|
getRenewer();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return a string representation of the token */
|
/** @return a string representation of the token */
|
||||||
|
|
|
@ -39,6 +39,9 @@ Trunk (Unreleased)
|
||||||
HDFS-8981. Adding revision to data node jmx getVersion() method. (Siqi Li
|
HDFS-8981. Adding revision to data node jmx getVersion() method. (Siqi Li
|
||||||
via mingma)
|
via mingma)
|
||||||
|
|
||||||
|
HDFS-9085. Show renewer information in DelegationTokenIdentifier#toString.
|
||||||
|
(Zhihai Xu via cnauroth)
|
||||||
|
|
||||||
NEW FEATURES
|
NEW FEATURES
|
||||||
|
|
||||||
HDFS-3125. Add JournalService to enable Journal Daemon. (suresh)
|
HDFS-3125. Add JournalService to enable Journal Daemon. (suresh)
|
||||||
|
|
|
@ -314,4 +314,13 @@ public class TestDelegationToken {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDelegationTokenIdentifierToString() throws Exception {
|
||||||
|
DelegationTokenIdentifier dtId = new DelegationTokenIdentifier(new Text(
|
||||||
|
"SomeUser"), new Text("JobTracker"), null);
|
||||||
|
Assert.assertEquals("HDFS_DELEGATION_TOKEN token 0" +
|
||||||
|
" for SomeUser with renewer JobTracker",
|
||||||
|
dtId.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue