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);
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) {