int failedCounter = 0;
int rc = 0;
DAGStatus.State lastState = null;
String lastReport = null;
Set<StatusGetOpts> opts = new HashSet<StatusGetOpts>();
Heartbeater heartbeater = new Heartbeater(txnMgr, conf);
long startTime = 0;
boolean isProfileEnabled = conf.getBoolVar(conf, HiveConf.ConfVars.TEZ_EXEC_SUMMARY);
boolean inPlaceUpdates = conf.getBoolVar(conf, HiveConf.ConfVars.TEZ_EXEC_INPLACE_PROGRESS);
boolean wideTerminal = false;
boolean isTerminal = inPlaceUpdates == true ? isUnixTerminal() : false;
// we need at least 80 chars wide terminal to display in-place updates properly
if (isTerminal) {
if (getTerminalWidth() >= MIN_TERMINAL_WIDTH) {
wideTerminal = true;
}
}
boolean inPlaceEligible = false;
if (inPlaceUpdates && isTerminal && wideTerminal && !console.getIsSilent()) {
inPlaceEligible = true;
}
shutdownList.add(dagClient);
console.printInfo("\n");
perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_RUN_DAG);
perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_SUBMIT_TO_RUNNING);
while (true) {
try {
status = dagClient.getDAGStatus(opts);
Map<String, Progress> progressMap = status.getVertexProgress();
DAGStatus.State state = status.getState();
heartbeater.heartbeat();
if (state != lastState || state == RUNNING) {
lastState = state;
switch (state) {