本文整理了Java中org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier类的一些代码示例,展示了
本文整理了Java中org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier
类的一些代码示例,展示了JobTokenIdentifier
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JobTokenIdentifier
类的具体详情如下:
包路径:org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier
类名称:JobTokenIdentifier
JobTokenIdentifier介绍
[英]The token identifier for job token
[中]作业令牌的令牌标识符
代码示例
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Create an empty job token identifier
* @return a newly created empty job token identifier
*/
@Override
public JobTokenIdentifier createIdentifier() {
return new JobTokenIdentifier();
}
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Look up the token password/secret for the given job token identifier.
* @param identifier the job token identifier to look up
* @return token password/secret as byte[]
* @throws InvalidToken
*/
@Override
public byte[] retrievePassword(JobTokenIdentifier identifier)
throws InvalidToken {
return retrieveTokenSecret(identifier.getJobId().toString()).getEncoded();
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Create a new password/secret for the given job token identifier.
* @param identifier the job token identifier
* @return token password/secret
*/
@Override
public byte[] createPassword(JobTokenIdentifier identifier) {
byte[] result = createPassword(identifier.getBytes(), masterKey);
return result;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-app
new JobTokenIdentifier(new Text(oldJobIDString));
job.jobToken =
new Token(identifier, job.jobTokenSecretManager);
job.jobToken.setService(identifier.getJobId());
代码示例来源:origin: org.apache.giraph/giraph-core
"password for client: " + tokenIdentifier.getUser());
if (LOG.isDebugEnabled()) {
String username =
getIdentifier(authzid, secretManager).getUser().getUserName();
if (LOG.isDebugEnabled()) {
LOG.debug("handle: SASL server DIGEST-MD5 callback: setting " +
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
new JobTokenIdentifier(new Text(oldJobIDString));
job.jobToken =
new Token(identifier, job.jobTokenSecretManager);
job.jobToken.setService(identifier.getJobId());
代码示例来源:origin: io.hops/hadoop-mapreduce-client-app
new JobTokenIdentifier(new Text(oldJobIDString));
job.jobToken =
new Token(identifier, job.jobTokenSecretManager);
job.jobToken.setService(identifier.getJobId());
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Create an empty job token identifier
* @return a newly created empty job token identifier
*/
@Override
public JobTokenIdentifier createIdentifier() {
return new JobTokenIdentifier();
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Look up the token password/secret for the given job token identifier.
* @param identifier the job token identifier to look up
* @return token password/secret as byte[]
* @throws InvalidToken
*/
@Override
public byte[] retrievePassword(JobTokenIdentifier identifier)
throws InvalidToken {
return retrieveTokenSecret(identifier.getJobId().toString()).getEncoded();
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Create a new password/secret for the given job token identifier.
* @param identifier the job token identifier
* @return token password/secret
*/
@Override
public byte[] createPassword(JobTokenIdentifier identifier) {
byte[] result = createPassword(identifier.getBytes(), masterKey);
return result;
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* generate job token and save it into the file
* @throws IOException
*/
private void generateAndStoreTokens() throws IOException{
Path jobDir = jobtracker.getSystemDirectoryForJob(jobId);
Path keysFile = new Path(jobDir, TokenCache.JOB_TOKEN_HDFS_FILE);
if (tokenStorage == null) {
tokenStorage = new Credentials();
}
//create JobToken file and write token to it
JobTokenIdentifier identifier = new JobTokenIdentifier(new Text(jobId
.toString()));
Token token = new Token(identifier,
jobtracker.getJobTokenSecretManager());
token.setService(identifier.getJobId());
TokenCache.setJobToken(token, tokenStorage);
// write TokenStorage out
tokenStorage.writeTokenStorageFile(keysFile, jobtracker.getConf());
LOG.info("jobToken generated and stored with users keys in "
+ keysFile.toUri().getPath());
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Create an empty job token identifier
* @return a newly created empty job token identifier
*/
@Override
public JobTokenIdentifier createIdentifier() {
return new JobTokenIdentifier();
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Look up the token password/secret for the given job token identifier.
* @param identifier the job token identifier to look up
* @return token password/secret as byte[]
* @throws InvalidToken
*/
@Override
public byte[] retrievePassword(JobTokenIdentifier identifier)
throws InvalidToken {
return retrieveTokenSecret(identifier.getJobId().toString()).getEncoded();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Create a new password/secret for the given job token identifier.
* @param identifier the job token identifier
* @return token password/secret
*/
@Override
public byte[] createPassword(JobTokenIdentifier identifier) {
byte[] result = createPassword(identifier.getBytes(), masterKey);
return result;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Create an empty job token identifier
* @return a newly created empty job token identifier
*/
@Override
public JobTokenIdentifier createIdentifier() {
return new JobTokenIdentifier();
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Look up the token password/secret for the given job token identifier.
* @param identifier the job token identifier to look up
* @return token password/secret as byte[]
* @throws InvalidToken
*/
@Override
public byte[] retrievePassword(JobTokenIdentifier identifier)
throws InvalidToken {
return retrieveTokenSecret(identifier.getJobId().toString()).getEncoded();
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Create a new password/secret for the given job token identifier.
* @param identifier the job token identifier
* @return token password/secret
*/
@Override
public byte[] createPassword(JobTokenIdentifier identifier) {
byte[] result = createPassword(identifier.getBytes(), masterKey);
return result;
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Create an empty job token identifier
* @return a newly created empty job token identifier
*/
@Override
public JobTokenIdentifier createIdentifier() {
return new JobTokenIdentifier();
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Look up the token password/secret for the given job token identifier.
* @param identifier the job token identifier to look up
* @return token password/secret as byte[]
* @throws InvalidToken
*/
@Override
public byte[] retrievePassword(JobTokenIdentifier identifier)
throws InvalidToken {
return retrieveTokenSecret(identifier.getJobId().toString()).getEncoded();
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Create a new password/secret for the given job token identifier.
* @param identifier the job token identifier
* @return token password/secret
*/
@Override
public byte[] createPassword(JobTokenIdentifier identifier) {
byte[] result = createPassword(identifier.getBytes(), masterKey);
return result;
}