/** * Obtain JobToken, which we'll use as a credential for SASL authentication * when connecting to other Giraph BSPWorkers. * * @param conf Configuration * @return a JobToken containing username and password so that client can * authenticate with a server. */ private Token<JobTokenIdentifier> createJobToken(Configuration conf) throws IOException { String localJobTokenFile = System.getenv().get( UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION); if (localJobTokenFile != null) { JobConf jobConf = new JobConf(conf); Credentials credentials = TokenCache.loadTokens(localJobTokenFile, jobConf); return TokenCache.getJobToken(credentials); } else { throw new IOException("createJobToken: Cannot obtain authentication " + "credentials for job: file: '" + UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION + "' not found"); } }
Token<JobTokenIdentifier> jobToken = TokenCache.getJobToken(conf .getCredentials());
Token<JobTokenIdentifier> jobToken = TokenCache.getJobToken(conf .getCredentials());
Token<JobTokenIdentifier> jobToken = TokenCache.getJobToken(conf .getCredentials());
Token<JobTokenIdentifier> jobToken = TokenCache.getJobToken(conf .getCredentials());
Token<JobTokenIdentifier> jobToken = TokenCache.getJobToken(conf .getCredentials());
Token<JobTokenIdentifier> jt = TokenCache.getJobToken(ts); if (jt != null) { //could be null in the case of some unit tests getJobTokenSecretManager().addTokenForJob(jobId.toString(), jt);
LOG.debug("loading token. # keys =" +credentials.numberOfSecretKeys() + "; from file=" + jobTokenFile); Token<JobTokenIdentifier> jt = TokenCache.getJobToken(credentials); jt.setService(new Text(address.getAddress().getHostAddress() + ":" + address.getPort()));
Token<JobTokenIdentifier> jt = TokenCache.getJobToken(credentials); SecurityUtil.setTokenService(jt, address); taskOwner.addToken(jt);
Token<JobTokenIdentifier> jt = TokenCache.getJobToken(credentials); SecurityUtil.setTokenService(jt, address); taskOwner.addToken(jt);
Token<JobTokenIdentifier> jt = TokenCache.getJobToken(credentials); SecurityUtil.setTokenService(jt, address); taskOwner.addToken(jt);