Search in sources :

Example 1 with HostServiceStatuses

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));
    }
}
Also used : HostServiceStatuses(com.sequenceiq.cloudbreak.cluster.status.HostServiceStatuses) NodeIsBusyException(com.sequenceiq.cloudbreak.cluster.service.NodeIsBusyException)

Aggregations

NodeIsBusyException (com.sequenceiq.cloudbreak.cluster.service.NodeIsBusyException)1 HostServiceStatuses (com.sequenceiq.cloudbreak.cluster.status.HostServiceStatuses)1