if (components.contains("NODEMANAGER")) {
Integer requestId = ambariClient.decommissionNodeManager(hostName);
installRequests.put("NODEMANAGER_DECOMMISION", requestId);
}
if (components.contains("DATANODE")) {
Integer requestId = ambariClient.decommissionDataNode(hostName);
installRequests.put("DATANODE_DECOMMISION", requestId);
}
List<String> componentsList = new ArrayList<>();
componentsList.addAll(components);
Map<String, Integer> stopRequests = ambariClient.stopComponentsOnHost(hostName, componentsList);