private void addCredentials() { if (UserGroupInformation.isSecurityEnabled()) { Credentials systemCredentials = context.getSystemCredentialsForApps().get(appId); if (systemCredentials != null) { 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); } } }
private Credentials getSystemCredentialsSentFromRM( LocalizerContext localizerContext) throws IOException { ApplicationId appId = localizerContext.getContainerId().getApplicationAttemptId() .getApplicationId(); Credentials systemCredentials = nmContext.getSystemCredentialsForApps().get(appId); if (systemCredentials == null) { return null; } if (LOG.isDebugEnabled()) { LOG.debug("Adding new framework-token for " + appId + " for localization: " + systemCredentials.getAllTokens()); } return systemCredentials; }
private Credentials getSystemCredentialsSentFromRM( LocalizerContext localizerContext) throws IOException { ApplicationId appId = localizerContext.getContainerId().getApplicationAttemptId() .getApplicationId(); Credentials systemCredentials = nmContext.getSystemCredentialsForApps().get(appId); if (systemCredentials == null) { return null; } if (LOG.isDebugEnabled()) { LOG.debug("Adding new framework-token for " + appId + " for localization: " + systemCredentials.getAllTokens()); } return systemCredentials; }
private Credentials getSystemCredentialsSentFromRM( LocalizerContext localizerContext) throws IOException { ApplicationId appId = localizerContext.getContainerId().getApplicationAttemptId() .getApplicationId(); Credentials systemCredentials = nmContext.getSystemCredentialsForApps().get(appId); if (systemCredentials == null) { return null; } if (LOG.isDebugEnabled()) { LOG.debug("Adding new framework-token for " + appId + " for localization: " + systemCredentials.getAllTokens()); } return systemCredentials; }
private Credentials getSystemCredentialsSentFromRM( LocalizerContext localizerContext) throws IOException { ApplicationId appId = localizerContext.getContainerId().getApplicationAttemptId() .getApplicationId(); Credentials systemCredentials = nmContext.getSystemCredentialsForApps().get(appId); if (systemCredentials == null) { return null; } if (LOG.isDebugEnabled()) { LOG.debug("Adding new framework-token for " + appId + " for localization: " + systemCredentials.getAllTokens()); } return systemCredentials; }
private void checkAndEnableAppAggregators() { for (ApplicationId appId : invalidTokenApps) { try { AppLogAggregator aggregator = appLogAggregators.get(appId); if (aggregator != null) { Credentials credentials = context.getSystemCredentialsForApps().get(appId); if (credentials != null) { // Create the app dir again with LogAggregationFileController logAggregationFileController = getLogAggregationFileController(getConfig()); UserGroupInformation userUgi = aggregator.updateCredentials(credentials); logAggregationFileController .createAppDir(userUgi.getShortUserName(), appId, userUgi); aggregator.enableLogAggregation(); } invalidTokenApps.remove(appId); LOG.info("LogAggregation enabled for application {}", appId); } } catch (Exception e) { //Ignore exception LOG.warn("Enable aggregators failed {}", appId); } } }
context.getSystemCredentialsForApps().get(appId); if (systemCredentials != null) { if (LOG.isDebugEnabled()) {
context.getSystemCredentialsForApps().get(appId); if (systemCredentials != null) { if (LOG.isDebugEnabled()) {
context.getSystemCredentialsForApps().get(appId); if (systemCredentials != null) { if (LOG.isDebugEnabled()) {