@Override public Token<?> run() throws IOException { Credentials c; try { c = DelegationTokenFetcher.getDTfromRemote(connectionFactory, nnUri, renewer, proxyUser); } catch (IOException e) { if (e.getCause() instanceof ConnectException) { LOG.warn("Couldn't connect to " + nnUri + ", assuming security is disabled"); return null; } if (LOG.isDebugEnabled()) { LOG.debug("Exception getting delegation token", e); } throw e; } for (Token<? extends TokenIdentifier> t : c.getAllTokens()) { if(LOG.isDebugEnabled()) { LOG.debug("Got dt for " + getUri() + ";t.service=" +t.getService()); } return t; } return null; } });
Credentials creds = getDTfromRemote(connectionFactory, new URI( webUrl), renewer, null); creds.writeTokenStorageFile(tokenFile, conf);
@Override public Token<?> run() throws IOException { Credentials c; try { c = DelegationTokenFetcher.getDTfromRemote(connectionFactory, nnUri, renewer, proxyUser); } catch (IOException e) { if (e.getCause() instanceof ConnectException) { LOG.warn("Couldn't connect to " + nnUri + ", assuming security is disabled"); return null; } if (LOG.isDebugEnabled()) { LOG.debug("Exception getting delegation token", e); } throw e; } for (Token<? extends TokenIdentifier> t : c.getAllTokens()) { if(LOG.isDebugEnabled()) { LOG.debug("Got dt for " + getUri() + ";t.service=" +t.getService()); } return t; } return null; } });
Credentials creds = getDTfromRemote(connectionFactory, new URI( webUrl), renewer, null); creds.writeTokenStorageFile(tokenFile, conf);