MAPREDUCE-4614. Simplify debugging a job's tokens (daryn via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1379595 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-08-31 20:37:41 +00:00
parent 015256524c
commit 63f941d2ad
3 changed files with 13 additions and 11 deletions

View File

@ -323,9 +323,6 @@ Release 2.1.0-alpha - Unreleased
MAPREDUCE-4380. Empty Userlogs directory is getting created under logs
directory (Devaraj K via bobby)
MAPREDUCE-4612. job summary file permissions not set when its created
(tgraves via bobby)
Release 2.0.0-alpha - 05-23-2012
INCOMPATIBLE CHANGES
@ -856,6 +853,11 @@ Release 0.23.3 - UNRELEASED
MAPREDUCE-4600. TestTokenCache.java from MRV1 no longer compiles (daryn
via bobby)
MAPREDUCE-4612. job summary file permissions not set when its created
(tgraves via bobby)
MAPREDUCE-4614. Simplify debugging a job's tokens (daryn via bobby)
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -93,7 +93,11 @@ class YarnChild {
// Security framework already loaded the tokens into current ugi
Credentials credentials =
UserGroupInformation.getCurrentUser().getCredentials();
LOG.info("Executing with tokens:");
for (Token<?> token: credentials.getAllTokens()) {
LOG.info(token);
}
// Create TaskUmbilicalProtocol as actual task owner.
UserGroupInformation taskOwner =
UserGroupInformation.createRemoteUser(firstTaskid.getJobID().toString());

View File

@ -435,13 +435,9 @@ class JobSubmitter {
private void printTokens(JobID jobId,
Credentials credentials) throws IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Printing tokens for job: " + jobId);
for(Token<?> token: credentials.getAllTokens()) {
if (token.getKind().toString().equals("HDFS_DELEGATION_TOKEN")) {
LOG.debug("Submitting with " + token);
}
}
LOG.info("Submitting tokens for job: " + jobId);
for (Token<?> token: credentials.getAllTokens()) {
LOG.info(token);
}
}