long stackId = stack.getId();
String action = stopped ? "stop" : "start";
int requestId = -1;
try {
if (stopped) {
requestId = ambariClient.stopAllServices();
} else {
requestId = ambariClient.startAllServices();
}
} catch (Exception e) {
LOGGER.warn(String.format("Failed to %s Hadoop services", action), e);