use of com.sequenceiq.cloudbreak.cluster.status.HostServiceStatuses in project cloudbreak by hortonworks.
the class ClouderaManagerDecomissioner method verifyNodeNotBusy.
private void verifyNodeNotBusy(Collection<String> hosts, ApiClient client) {
HostServiceStatuses hostServiceStates = getHostServiceStatuses(hosts, client);
if (hostServiceStates.anyHostBusy()) {
Set<String> busyHostNames = hostServiceStates.getBusyHosts();
LOGGER.info("Cannot downscale, some nodes are is BUSY state : ", busyHostNames);
throw new NodeIsBusyException(String.format("Node is in 'busy' state, cannot be decommissioned right now. " + "Please try to remove the node later. Busy hosts: %s", busyHostNames));
}
}
Aggregations