@Override public Credentials call() throws Exception { return tokenSecureStoreRenewer.createCredentials(); } });
@Override public Credentials call() throws Exception { return tokenSecureStoreRenewer.createCredentials(); } });
@Override public void renew(String application, RunId runId, SecureStoreWriter secureStoreWriter) throws IOException { Credentials credentials = createCredentials(); UserGroupInformation currentUser = null; try { currentUser = UserGroupInformation.getCurrentUser(); } catch (IOException e) { // this shouldn't happen LOG.debug("Cannot determine current user", e); } LOG.debug("Updating credentials for application {}, run {}, tokens {}, with current user {}", application, runId, credentials.getAllTokens(), currentUser); secureStoreWriter.write(YarnSecureStore.create(credentials)); }
@Override public void renew(String application, RunId runId, SecureStoreWriter secureStoreWriter) throws IOException { Credentials credentials = createCredentials(); UserGroupInformation currentUser = null; try { currentUser = UserGroupInformation.getCurrentUser(); } catch (IOException e) { // this shouldn't happen LOG.debug("Cannot determine current user", e); } LOG.debug("Updating credentials for application {}, run {}, tokens {}, with current user {}", application, runId, credentials.getAllTokens(), currentUser); secureStoreWriter.write(YarnSecureStore.create(credentials)); }
@Override public TwillController start(final long timeout, final TimeUnit timeoutUnit) { try { return impersonator.doAs(programId, () -> { // Add secure tokens if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) { addSecureStore(YarnSecureStore.create(secureStoreRenewer.createCredentials())); } return new ImpersonatedTwillController(delegate.start(timeout, timeoutUnit), impersonator, programId); }); } catch (Exception e) { throw Throwables.propagate(e); } } }
@Override public TwillController start(final long timeout, final TimeUnit timeoutUnit) { try { return impersonator.doAs(programId, () -> { // Add secure tokens if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) { addSecureStore(YarnSecureStore.create(secureStoreRenewer.createCredentials())); } return new ImpersonatedTwillController(delegate.start(timeout, timeoutUnit), impersonator, programId); }); } catch (Exception e) { throw Throwables.propagate(e); } } }
preparer.addSecureStore(YarnSecureStore.create(secureStoreRenewer.createCredentials()));