本文整理了Java中org.apache.hadoop.yarn.api.ApplicationMasterProtocol
类的一些代码示例,展示了ApplicationMasterProtocol
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationMasterProtocol
类的具体详情如下:
包路径:org.apache.hadoop.yarn.api.ApplicationMasterProtocol
类名称:ApplicationMasterProtocol
[英]The protocol between a live instance of ApplicationMaster
and the ResourceManager
.
This is used by the ApplicationMaster
to register/unregister and to request and obtain resources in the cluster from the ResourceManager
.
[中]ApplicationMaster
的活动实例与ResourceManager
之间的协议。ApplicationMaster
使用它来注册/注销以及从ResourceManager
请求和获取集群中的资源。
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager
@Override
public AllocateResponse allocate(AllocateRequest request) throws
YarnException, IOException {
return rmClient.allocate(request);
}
代码示例来源:origin: org.springframework.data/spring-yarn-core
@Override
public FinishApplicationMasterResponse doInYarn(ApplicationMasterProtocol proxy) throws YarnException,
IOException {
return proxy.finishApplicationMaster(request);
}
});
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager
@Override
public RegisterApplicationMasterResponse registerApplicationMaster
(RegisterApplicationMasterRequest request) throws YarnException,
IOException {
return rmClient.registerApplicationMaster(request);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
client.registerApplicationMaster(request);
AllocateRequest allocateRequest =
AllocateRequest.newInstance(0, 0.0f, null, null, null);
client.allocate(allocateRequest);
barrier.await();
otherThread.join();
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
rmClient.registerApplicationMaster(request);
finishAMRequest.setDiagnostics("diagnostics");
finishAMRequest.setTrackingUrl("url");
rmClient.finishApplicationMaster(finishAMRequest);
Records.newRecord(AllocateRequest.class);
try {
rmClient.allocate(allocateRequest);
Assert.fail("You got to be kidding me! "
+ "Using App tokens after app-finish should fail!");
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
client.registerApplicationMaster(request);
AllocateRequest allocateRequest =
AllocateRequest.newInstance(0, 0.0f, asks, null, null);
client.allocate(allocateRequest);
client.allocate(allocateRequest);
allocateRequest =
AllocateRequest.newInstance(2, 0.0f, null, release, null);
client.allocate(allocateRequest);
barrier.await();
otherThread.join();
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
rmClient.registerApplicationMaster(request);
finishAMRequest.setDiagnostics("diagnostics");
finishAMRequest.setTrackingUrl("url");
rmClient.finishApplicationMaster(finishAMRequest);
Records.newRecord(AllocateRequest.class);
try {
rmClient.allocate(allocateRequest);
Assert.fail("You got to be kidding me! "
+ "Using App tokens after app-finish should fail!");
代码示例来源:origin: org.springframework.data/spring-yarn-core
@Override
public AllocateResponse doInYarn(ApplicationMasterProtocol proxy) throws YarnException, IOException {
return proxy.allocate(request);
}
});
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
rmClient.registerApplicationMaster(request);
Records.newRecord(AllocateRequest.class);
Assert.assertTrue(
rmClient.allocate(allocateRequest).getAMCommand() == null);
rmClient.allocate(allocateRequest);
Thread.sleep(500);
.assertTrue(rmClient.allocate(allocateRequest).getAMCommand() == null);
rmClient.allocate(allocateRequest);
} catch (Exception ex) {
break;
allocateRequest = Records.newRecord(AllocateRequest.class);
Assert
.assertTrue(rmClient.allocate(allocateRequest).getAMCommand() == null);
allocateRequest = Records.newRecord(AllocateRequest.class);
Assert
.assertTrue(rmClient.allocate(allocateRequest).getAMCommand() == null);
Assert.fail("The old Token should not work");
} catch (Exception ex) {
代码示例来源: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 FinishApplicationMasterResponse finishApplicationMaster
(FinishApplicationMasterRequest request) throws YarnException,
IOException {
return rmClient.finishApplicationMaster(request);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Override
public AllocateResponse run() throws Exception {
return amRMProtocol.allocate(req);
}
});
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
rmClient.registerApplicationMaster(request);
Records.newRecord(AllocateRequest.class);
Assert.assertTrue(
rmClient.allocate(allocateRequest).getAMCommand() == null);
rmClient.allocate(allocateRequest);
Thread.sleep(500);
.assertTrue(rmClient.allocate(allocateRequest).getAMCommand() == null);
rmClient.allocate(allocateRequest);
} catch (Exception ex) {
break;
allocateRequest = Records.newRecord(AllocateRequest.class);
Assert
.assertTrue(rmClient.allocate(allocateRequest).getAMCommand() == null);
allocateRequest = Records.newRecord(AllocateRequest.class);
Assert
.assertTrue(rmClient.allocate(allocateRequest).getAMCommand() == null);
Assert.fail("The old Token should not work");
} catch (Exception ex) {
代码示例来源: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-nodemanager
@Override
public FinishApplicationMasterResponse finishApplicationMaster(
final FinishApplicationMasterRequest request) throws YarnException,
IOException {
LOG.info("Forwarding finish application request to "
+ "the real YARN Resource Manager");
return rmClient.finishApplicationMaster(request);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Override
public AllocateResponse run() throws Exception {
return amRMProtocol.allocate(req);
}
});
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
client.registerApplicationMaster(request);
boolean error = false;
try {
client.allocate(allocateRequest);
} catch (InvalidResourceBlacklistRequestException e) {
error = true;
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Override
public RegisterApplicationMasterResponse run() throws Exception {
return amRMProtocol.registerApplicationMaster(req);
}
});
代码示例来源:origin: io.hops/hadoop-yarn-server-nodemanager
@Override
public FinishApplicationMasterResponse finishApplicationMaster(
final FinishApplicationMasterRequest request) throws YarnException,
IOException {
LOG.info("Forwarding finish application request to "
+ "the real YARN Resource Manager");
return rmClient.finishApplicationMaster(request);
}
代码示例来源:origin: io.hops/hadoop-yarn-server-nodemanager
@Override
public AllocateResponse allocate(final AllocateRequest request)
throws YarnException, IOException {
if (LOG.isDebugEnabled()) {
LOG.debug("Forwarding allocate request to the real YARN RM");
}
AllocateResponse allocateResponse = rmClient.allocate(request);
if (allocateResponse.getAMRMToken() != null) {
updateAMRMToken(allocateResponse.getAMRMToken());
}
return allocateResponse;
}
内容来源于网络,如有侵权,请联系作者删除!