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
|
YARN-2843. Fixed NodeLabelsManager to trim inputs for hosts and labels so
|
||||||
as to make them work correctly. (Wangda Tan via vinodkv)
|
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
|
Release 2.5.2 - 2014-11-10
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -317,7 +317,7 @@ public class NodeManager extends CompositeService
|
||||||
protected final ConcurrentMap<ApplicationId, Application> applications =
|
protected final ConcurrentMap<ApplicationId, Application> applications =
|
||||||
new ConcurrentHashMap<ApplicationId, Application>();
|
new ConcurrentHashMap<ApplicationId, Application>();
|
||||||
|
|
||||||
private Map<ApplicationId, Credentials> systemCredentials =
|
private volatile Map<ApplicationId, Credentials> systemCredentials =
|
||||||
new HashMap<ApplicationId, Credentials>();
|
new HashMap<ApplicationId, Credentials>();
|
||||||
|
|
||||||
protected final ConcurrentMap<ContainerId, Container> containers =
|
protected final ConcurrentMap<ContainerId, Container> containers =
|
||||||
|
|
|
@ -552,7 +552,10 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
|
||||||
map.put(entry.getKey(), credentials);
|
map.put(entry.getKey(), credentials);
|
||||||
}
|
}
|
||||||
if (LOG.isDebugEnabled()) {
|
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;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1122,9 +1122,9 @@ public class ResourceLocalizationService extends CompositeService
|
||||||
if (systemCredentials == null) {
|
if (systemCredentials == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (Token<?> token : systemCredentials.getAllTokens()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.info("Adding new framework-token for " + appId
|
LOG.debug("Adding new framework-token for " + appId
|
||||||
+ " for localization: " + token);
|
+ " for localization: " + systemCredentials.getAllTokens());
|
||||||
}
|
}
|
||||||
return systemCredentials;
|
return systemCredentials;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,9 +202,10 @@ public class AppLogAggregatorImpl implements AppLogAggregator {
|
||||||
Credentials systemCredentials =
|
Credentials systemCredentials =
|
||||||
context.getSystemCredentialsForApps().get(appId);
|
context.getSystemCredentialsForApps().get(appId);
|
||||||
if (systemCredentials != null) {
|
if (systemCredentials != null) {
|
||||||
for (Token<?> token : systemCredentials.getAllTokens()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.info("Adding new framework-token for " + appId
|
LOG.debug("Adding new framework-token for " + appId
|
||||||
+ " for log-aggregation: " + token + " user=" + userUgi);
|
+ " for log-aggregation: " + systemCredentials.getAllTokens()
|
||||||
|
+ "; userUgi=" + userUgi);
|
||||||
}
|
}
|
||||||
// this will replace old token
|
// this will replace old token
|
||||||
userUgi.addCredentials(systemCredentials);
|
userUgi.addCredentials(systemCredentials);
|
||||||
|
|
Loading…
Reference in New Issue