if (dagAMState.equals(DAGAppMasterState.NEW)) {
LOG.info("DAGAppMaster is not started wait for 100ms...");
} else if (dagAMState.equals(DAGAppMasterState.INITED)) {
LOG.info("DAGAppMaster is not startetd wait for 100ms...");
} else if (dagAMState.equals(DAGAppMasterState.ERROR)) {
throw new TezException("DAGAppMaster got an error during initialization");
} else if (dagAMState.equals(DAGAppMasterState.KILLED)) {
throw new TezException("DAGAppMaster is killed");
} else {
break;
}
}
if (waitingTime < TIME_OUT) {
LOG.info("DAGAppMaster is not created wait for 100ms...");
Thread.sleep(100);
waitingTime += 100;
} else {
throw new TezException("Time out creating DAGAppMaster");
}
}
} catch (Throwable t) {
LOG.fatal("Error starting DAGAppMaster", t);
dagAmThread.interrupt();