YARN-2794. Fixed log messages about distributing system-credentials. Contributed by Jian He.
This commit is contained in:
parent
51957ca818
commit
be7bf956e9
@ -949,6 +949,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
|
||||
|
@ -317,7 +317,7 @@ public static class NMContext implements Context {
|
||||
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 =
|
||||
|
@ -552,7 +552,10 @@ private static Map<ApplicationId, Credentials> parseCredentials(
|
||||
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;
|
||||
}
|
||||
|
@ -1122,9 +1122,9 @@ private Credentials getSystemCredentialsSentFromRM(
|
||||
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;
|
||||
}
|
||||
|
@ -202,9 +202,10 @@ private void uploadLogsForContainers() {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user