本文整理了Java中org.apache.hadoop.yarn.api.ApplicationMasterProtocol.registerApplicationMaster()
方法的一些代码示例,展示了ApplicationMasterProtocol.registerApplicationMaster()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationMasterProtocol.registerApplicationMaster()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.ApplicationMasterProtocol
类名称:ApplicationMasterProtocol
方法名:registerApplicationMaster
[英]The interface used by a new ApplicationMaster
to register with the ResourceManager
.
The ApplicationMaster
needs to provide details such as RPC Port, HTTP tracking url etc. as specified in RegisterApplicationMasterRequest.
The ResourceManager
responds with critical details such as maximum resource capabilities in the cluster as specified in RegisterApplicationMasterResponse.
Re-register is only allowed for Unmanaged Application Master
(UAM) HA, with org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext#getKeepContainersAcrossApplicationAttempts()set to true.
[中]新ApplicationMaster
用于向ResourceManager
注册的接口。ApplicationMaster
需要提供详细信息,如RegisterApplicationMasterRequest中指定的RPC端口、HTTP跟踪url等。ResourceManager
以关键细节响应,例如RegisterApplicationMasterResponse中指定的集群中的最大资源能力。
仅允许Unmanaged Application Master
(UAM)HA使用组织重新注册。阿帕奇。hadoop。纱线应用程序编程接口。记录。ApplicationSubmissionContext#GetKeepContainersAcrossapplicationAttents()设置为true。
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager
@Override
public RegisterApplicationMasterResponse registerApplicationMaster
(RegisterApplicationMasterRequest request) throws YarnException,
IOException {
return rmClient.registerApplicationMaster(request);
}
代码示例来源:origin: io.hops/hadoop-yarn-server-nodemanager
@Override
public RegisterApplicationMasterResponse registerApplicationMaster(
final RegisterApplicationMasterRequest request)
throws YarnException, IOException {
LOG.info("Forwarding registration request to the real YARN RM");
return rmClient.registerApplicationMaster(request);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager
@Override
public RegisterApplicationMasterResponse registerApplicationMaster(
final RegisterApplicationMasterRequest request)
throws YarnException, IOException {
LOG.info("Forwarding registration request to the real YARN RM");
return rmClient.registerApplicationMaster(request);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Override
public RegisterApplicationMasterResponse run() throws Exception {
return amRMProtocol.registerApplicationMaster(req);
}
});
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Override
public RegisterApplicationMasterResponse run() throws Exception {
return amRMProtocol.registerApplicationMaster(req);
}
});
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-client
private RegisterApplicationMasterResponse registerApplicationMaster()
throws YarnException, IOException {
RegisterApplicationMasterRequest request =
RegisterApplicationMasterRequest.newInstance(this.appHostName,
this.appHostPort, this.appTrackingUrl);
RegisterApplicationMasterResponse response =
rmClient.registerApplicationMaster(request);
synchronized (this) {
lastResponseId = 0;
if (!response.getNMTokensFromPreviousAttempts().isEmpty()) {
populateNMTokens(response.getNMTokensFromPreviousAttempts());
}
}
return response;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-client
private RegisterApplicationMasterResponse registerApplicationMaster()
throws YarnException, IOException {
RegisterApplicationMasterRequest request =
RegisterApplicationMasterRequest.newInstance(this.appHostName,
this.appHostPort, this.appTrackingUrl);
RegisterApplicationMasterResponse response =
rmClient.registerApplicationMaster(request);
synchronized (this) {
lastResponseId = 0;
if (!response.getNMTokensFromPreviousAttempts().isEmpty()) {
populateNMTokens(response.getNMTokensFromPreviousAttempts());
}
}
return response;
}
代码示例来源:origin: io.hops/hadoop-yarn-client
private RegisterApplicationMasterResponse registerApplicationMaster()
throws YarnException, IOException {
RegisterApplicationMasterRequest request =
RegisterApplicationMasterRequest.newInstance(this.appHostName,
this.appHostPort, this.appTrackingUrl);
RegisterApplicationMasterResponse response =
rmClient.registerApplicationMaster(request);
synchronized (this) {
lastResponseId = 0;
if (!response.getNMTokensFromPreviousAttempts().isEmpty()) {
populateNMTokens(response.getNMTokensFromPreviousAttempts());
}
}
return response;
}
代码示例来源:origin: org.springframework.data/spring-yarn-core
@Override
public RegisterApplicationMasterResponse doInYarn(ApplicationMasterProtocol proxy) throws YarnException,
IOException {
RegisterApplicationMasterRequest appMasterRequest = Records
.newRecord(RegisterApplicationMasterRequest.class);
appMasterRequest.setHost(host != null ? host : "");
appMasterRequest.setRpcPort(rpcPort != null ? rpcPort : 0);
appMasterRequest.setTrackingUrl(trackUrl != null ? trackUrl : "");
return proxy.registerApplicationMaster(appMasterRequest);
}
});
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common
@Override
public RegisterApplicationMasterResponseProto registerApplicationMaster(
RpcController arg0, RegisterApplicationMasterRequestProto proto)
throws ServiceException {
RegisterApplicationMasterRequestPBImpl request = new RegisterApplicationMasterRequestPBImpl(proto);
try {
RegisterApplicationMasterResponse response = real.registerApplicationMaster(request);
return ((RegisterApplicationMasterResponsePBImpl)response).getProto();
} catch (YarnException e) {
throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
@Override
public RegisterApplicationMasterResponseProto registerApplicationMaster(
RpcController arg0, RegisterApplicationMasterRequestProto proto)
throws ServiceException {
RegisterApplicationMasterRequestPBImpl request = new RegisterApplicationMasterRequestPBImpl(proto);
try {
RegisterApplicationMasterResponse response = real.registerApplicationMaster(request);
return ((RegisterApplicationMasterResponsePBImpl)response).getProto();
} catch (YarnException e) {
throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
}
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
@Override
public RegisterApplicationMasterResponseProto registerApplicationMaster(
RpcController arg0, RegisterApplicationMasterRequestProto proto)
throws ServiceException {
RegisterApplicationMasterRequestPBImpl request = new RegisterApplicationMasterRequestPBImpl(proto);
try {
RegisterApplicationMasterResponse response = real.registerApplicationMaster(request);
return ((RegisterApplicationMasterResponsePBImpl)response).getProto();
} catch (YarnException e) {
throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-client
@SuppressWarnings("unchecked")
private RegisterApplicationMasterResponse registerApplicationMaster()
throws YarnException, IOException {
RegisterApplicationMasterRequest request =
RegisterApplicationMasterRequest.newInstance(this.appHostName,
this.appHostPort, this.appTrackingUrl);
if (!this.placementConstraints.isEmpty()) {
request.setPlacementConstraints(this.placementConstraints);
}
RegisterApplicationMasterResponse response =
rmClient.registerApplicationMaster(request);
synchronized (this) {
lastResponseId = 0;
if (!response.getNMTokensFromPreviousAttempts().isEmpty()) {
populateNMTokens(response.getNMTokensFromPreviousAttempts());
}
this.resourceProfilesMap = response.getResourceProfiles();
List<Container> prevContainers =
response.getContainersFromPreviousAttempts();
AMRMClientUtils.removeFromOutstandingSchedulingRequests(prevContainers,
this.outstandingSchedRequests);
}
return response;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-app
scheduler.registerApplicationMaster(request);
isApplicationMasterRegistered = true;
maxContainerCapability = response.getMaximumResourceCapability();
代码示例来源:origin: io.hops/hadoop-mapreduce-client-app
scheduler.registerApplicationMaster(request);
isApplicationMasterRegistered = true;
maxContainerCapability = response.getMaximumResourceCapability();
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
scheduler.registerApplicationMaster(request);
isApplicationMasterRegistered = true;
maxContainerCapability = response.getMaximumResourceCapability();
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
.newRecord(RegisterApplicationMasterRequest.class);
try {
client.registerApplicationMaster(request);
Assert.fail("Should fail with authorization error");
} catch (Exception e) {
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
.newRecord(RegisterApplicationMasterRequest.class);
try {
client.registerApplicationMaster(request);
Assert.fail("Should fail with authorization error");
} catch (Exception e) {
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
.newRecord(RegisterApplicationMasterRequest.class);
RegisterApplicationMasterResponse response =
client.registerApplicationMaster(request);
Assert.assertNotNull(response.getClientToAMTokenMasterKey());
if (UserGroupInformation.isSecurityEnabled()) {
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
client.registerApplicationMaster(request);
内容来源于网络,如有侵权,请联系作者删除!