double vProgressFloat = 0.0f;
log("DAG: State: " + dagStatus.getState() + " Progress: "
+ formatter.format(getProgress(dagProgress)) + " " + dagProgress);
boolean displayCounter = opts != null ? opts.contains(StatusGetOpts.GET_COUNTERS) : false;
if (displayCounter) {
TezCounters counters = dagStatus.getDAGCounters();
if (counters != null) {
log("DAG Counters:\n" + counters);
}
}
for (String vertex : vertexNames) {
VertexStatus vStatus = getVertexStatus(vertex, opts);
if (vStatus == null) {
log("Could not retrieve status for vertex: " + vertex);
continue;
}
Progress vProgress = vStatus.getProgress();
if (vProgress != null) {
vProgressFloat = 0.0f;
if (vProgress.getTotalTaskCount() == 0) {
vProgressFloat = 1.0f;
} else if (vProgress.getTotalTaskCount() > 0) {
vProgressFloat = getProgress(vProgress);
}
log("VertexStatus:" + " VertexName: " + vertex + " Progress: "
+ formatter.format(vProgressFloat) + " " + vProgress);
}
if (displayCounter) {
TezCounters counters = vStatus.getVertexCounters();
if (counters != null) {
log("Vertex Counters for " + vertex + ":\n" + counters);
}
}
} // end of for loop