本文整理了Java中org.apache.hadoop.yarn.api.records.Token.setService()
方法的一些代码示例,展示了Token.setService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Token.setService()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.records.Token
类名称:Token
方法名:setService
暂无
代码示例来源:origin: io.hops/hadoop-yarn-server-common
public static <T extends Token> T newToken(Class<T> tokenClass,
byte[] identifier, String kind, byte[] password, String service) {
T token = recordFactory.newRecordInstance(tokenClass);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common
public static <T extends Token> T newToken(Class<T> tokenClass,
byte[] identifier, String kind, byte[] password, String service) {
T token = recordFactory.newRecordInstance(tokenClass);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common
public static <T extends Token> T newToken(Class<T> tokenClass,
byte[] identifier, String kind, byte[] password, String service) {
T token = recordFactory.newRecordInstance(tokenClass);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-api
@Private
@Unstable
public static Token newInstance(byte[] identifier, String kind, byte[] password,
String service) {
Token token = Records.newRecord(Token.class);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-api
@Private
@Unstable
public static Token newInstance(byte[] identifier, String kind, byte[] password,
String service) {
Token token = Records.newRecord(Token.class);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: io.hops/hadoop-yarn-api
@Private
@Unstable
public static Token newInstance(byte[] identifier, String kind, byte[] password,
String service) {
Token token = Records.newRecord(Token.class);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-api
@Private
@Unstable
public static Token newInstance(byte[] identifier, String kind, byte[] password,
String service) {
Token token = Records.newRecord(Token.class);
token.setIdentifier(ByteBuffer.wrap(identifier));
token.setKind(kind);
token.setPassword(ByteBuffer.wrap(password));
token.setService(service);
return token;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient
public GetDelegationTokenResponse answer(InvocationOnMock invocation) {
GetDelegationTokenRequest request =
(GetDelegationTokenRequest)invocation.getArguments()[0];
// check that the renewer matches the cluster's RM principal
assertEquals(masterPrincipal, request.getRenewer() );
org.apache.hadoop.yarn.api.records.Token token =
recordFactory.newRecordInstance(org.apache.hadoop.yarn.api.records.Token.class);
// none of these fields matter for the sake of the test
token.setKind("");
token.setService("");
token.setIdentifier(ByteBuffer.allocate(0));
token.setPassword(ByteBuffer.allocate(0));
GetDelegationTokenResponse tokenResponse =
recordFactory.newRecordInstance(GetDelegationTokenResponse.class);
tokenResponse.setDelegationToken(token);
return tokenResponse;
}
});
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient
rmDTToken.setKind("Testclusterkind");
rmDTToken.setPassword(ByteBuffer.wrap("testcluster".getBytes()));
rmDTToken.setService("0.0.0.0:8032");
getDTResponse.setRMDelegationToken(rmDTToken);
final ApplicationClientProtocol cRMProtocol = mock(ApplicationClientProtocol.class);
内容来源于网络,如有侵权,请联系作者删除!