try {
if (hosts.containsKey(hostname)) {
LOG.info("Removing host from config group, hostname = " + hostname);
hosts.remove(hostname);
try {
ConfigGroupHostMappingEntityPK hostMappingEntityPK = new
ConfigGroupHostMappingEntityPK();
hostMappingEntityPK.setHostname(hostname);
hostMappingEntityPK.setConfigGroupId(configGroupEntity.getGroupId());
configGroupHostMappingDAO.removeByPK(hostMappingEntityPK);
} catch (Exception e) {
LOG.error("Failed to delete config group host mapping"
+ ", clusterName = " + getClusterName()
+ ", id = " + getId()