public boolean checkStatus(AmbariOperations t) {
MDCBuilder.buildMdcContext(t.getStack());
Map<String, Integer> installRequests = t.getRequests();
boolean allFinished = true;
for (Entry<String, Integer> request : installRequests.entrySet()) {
AmbariClient ambariClient = t.getAmbariClient();
BigDecimal installProgress = ambariClient.getRequestProgress(request.getValue());
LOGGER.info("Ambari operation: '{}', Progress: {}", request.getKey(), installProgress);
allFinished = allFinished && installProgress.compareTo(COMPLETED) == 0;
if (installProgress.compareTo(FAILED) == 0) {
boolean failed = true;
for (int i = 0; i < MAX_RETRY; i++) {
if (ambariClient.getRequestProgress(request.getValue()).compareTo(FAILED) != 0) {
failed = false;
break;
}
}
if (failed) {