List of usage examples for org.apache.hadoop.security.token Token isManaged
public boolean isManaged() throws IOException
From source file:org.apache.tez.engine.common.security.DelegationTokenRenewal.java
License:Apache License
public static synchronized void registerDelegationTokensForRenewal(ApplicationId jobId, Credentials ts, Configuration conf) throws IOException { if (ts == null) return; //nothing to add Collection<Token<?>> tokens = ts.getAllTokens(); long now = System.currentTimeMillis(); for (Token<?> t : tokens) { // first renew happens immediately if (t.isManaged()) { DelegationTokenToRenew dtr = new DelegationTokenToRenew(jobId, t, conf, now); addTokenToList(dtr);//from w w w. ja v a 2 s. c o m setTimerForTokenRenewal(dtr, true); LOG.info("registering token for renewal for service =" + t.getService() + " and jobID = " + jobId); } } }