本文整理了Java中org.apache.hadoop.yarn.api.records.YarnApplicationState.equals()
方法的一些代码示例,展示了YarnApplicationState.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnApplicationState.equals()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.records.YarnApplicationState
类名称:YarnApplicationState
方法名:equals
暂无
代码示例来源:origin: org.apache.slider/slider-core
app.getYarnApplicationState();
log.debug("app ID {} is in state {}", app.getApplicationId(), appstate);
if (appstate.equals(desiredState)) {
log.debug("match");
return app;
代码示例来源:origin: apache/incubator-slider
app.getYarnApplicationState();
log.debug("app ID {} is in state {}", app.getApplicationId(), appstate);
if (appstate.equals(desiredState)) {
log.debug("match");
return app;
代码示例来源:origin: harbby/sylph
/**
* 获取yarn Job运行情况
*/
private boolean isRunning()
{
try {
ApplicationReport app = yarnClient.getApplicationReport(getYarnAppId()); //获取某个指定的任务
YarnApplicationState state = app.getYarnApplicationState();
return YarnApplicationState.ACCEPTED.equals(state) || YarnApplicationState.RUNNING.equals(state);
}
catch (ApplicationNotFoundException e) { //app 不存在与yarn上面
return false;
}
catch (YarnException | IOException e) {
throw new SylphException(CONNECTION_ERROR, e);
}
}
代码示例来源:origin: org.springframework.data/spring-yarn-test
if (state.equals(stateCheck)) {
break done;
代码示例来源:origin: org.springframework.data/spring-yarn-test
if (state.equals(stateCheck)) {
break done;
代码示例来源:origin: DTStack/flinkx
if(!report.getYarnApplicationState().equals(YarnApplicationState.RUNNING)) {
continue;
代码示例来源:origin: DTStack/flinkStreamSQL
if(!report.getYarnApplicationState().equals(YarnApplicationState.RUNNING)) {
continue;
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
private void verifySubmitApp(MockRM rm, RMApp app,
ApplicationId expectedAppId) throws Exception {
int maxWaittingTimes = 20;
int count = 0;
while (true) {
YarnApplicationState state =
rm.getApplicationReport(app.getApplicationId())
.getYarnApplicationState();
if (!state.equals(YarnApplicationState.NEW) &&
!state.equals(YarnApplicationState.NEW_SAVING)) {
break;
}
if (count > maxWaittingTimes) {
break;
}
Thread.sleep(200);
count++;
}
// Verify submittion is successful
YarnApplicationState state =
rm.getApplicationReport(app.getApplicationId())
.getYarnApplicationState();
Assert.assertTrue(state == YarnApplicationState.ACCEPTED
|| state == YarnApplicationState.SUBMITTED);
Assert.assertEquals(expectedAppId, app.getApplicationId());
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
private void verifySubmitApp(MockRM rm, RMApp app,
ApplicationId expectedAppId) throws Exception {
int maxWaittingTimes = 20;
int count = 0;
while (true) {
YarnApplicationState state =
rm.getApplicationReport(app.getApplicationId())
.getYarnApplicationState();
if (!state.equals(YarnApplicationState.NEW) &&
!state.equals(YarnApplicationState.NEW_SAVING)) {
break;
}
if (count > maxWaittingTimes) {
break;
}
Thread.sleep(200);
count++;
}
// Verify submittion is successful
YarnApplicationState state =
rm.getApplicationReport(app.getApplicationId())
.getYarnApplicationState();
Assert.assertTrue(state == YarnApplicationState.ACCEPTED
|| state == YarnApplicationState.SUBMITTED);
Assert.assertEquals(expectedAppId, app.getApplicationId());
}
代码示例来源:origin: org.apache.slider/slider-core
try {
while (application != null &&
(state = application.getYarnApplicationState()).equals(
YarnApplicationState.RUNNING)) {
代码示例来源:origin: apache/incubator-slider
try {
while (application != null &&
(state = application.getYarnApplicationState()).equals(
YarnApplicationState.RUNNING)) {
内容来源于网络,如有侵权,请联系作者删除!