YARN-2794. Fixed log messages about distributing system-credentials. Contributed by Jian He.

(cherry picked from commit be7bf956e9)
This commit is contained in:
Zhijie Shen 2014-11-12 11:07:57 -08:00
parent de0073cbc4
commit 1535e7211e
5 changed files with 15 additions and 8 deletions

View File

@ -865,6 +865,9 @@ Release 2.6.0 - 2014-11-15
YARN-2843. Fixed NodeLabelsManager to trim inputs for hosts and labels so
as to make them work correctly. (Wangda Tan via vinodkv)
YARN-2794. Fixed log messages about distributing system-credentials. (Jian He via
zjshen)
Release 2.5.2 - 2014-11-10
INCOMPATIBLE CHANGES

View File

@ -317,7 +317,7 @@ public class NodeManager extends CompositeService
protected final ConcurrentMap<ApplicationId, Application> applications =
new ConcurrentHashMap<ApplicationId, Application>();
private Map<ApplicationId, Credentials> systemCredentials =
private volatile Map<ApplicationId, Credentials> systemCredentials =
new HashMap<ApplicationId, Credentials>();
protected final ConcurrentMap<ContainerId, Container> containers =

View File

@ -552,7 +552,10 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
map.put(entry.getKey(), credentials);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Retrieved credentials form RM: " + map);
for (Map.Entry<ApplicationId, Credentials> entry : map.entrySet()) {
LOG.debug("Retrieved credentials form RM for " + entry.getKey() + ": "
+ entry.getValue().getAllTokens());
}
}
return map;
}

View File

@ -1122,9 +1122,9 @@ public class ResourceLocalizationService extends CompositeService
if (systemCredentials == null) {
return null;
}
for (Token<?> token : systemCredentials.getAllTokens()) {
LOG.info("Adding new framework-token for " + appId
+ " for localization: " + token);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding new framework-token for " + appId
+ " for localization: " + systemCredentials.getAllTokens());
}
return systemCredentials;
}

View File

@ -202,9 +202,10 @@ public class AppLogAggregatorImpl implements AppLogAggregator {
Credentials systemCredentials =
context.getSystemCredentialsForApps().get(appId);
if (systemCredentials != null) {
for (Token<?> token : systemCredentials.getAllTokens()) {
LOG.info("Adding new framework-token for " + appId
+ " for log-aggregation: " + token + " user=" + userUgi);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding new framework-token for " + appId
+ " for log-aggregation: " + systemCredentials.getAllTokens()
+ "; userUgi=" + userUgi);
}
// this will replace old token
userUgi.addCredentials(systemCredentials);