@Override
        public boolean shouldHostBeRemoved(final String hostname)
          throws AmbariException {
          Host host = clusters.getHost(hostname);
          return !maintenanceStateHelper.isOperationAllowed(
            host, cluster.getClusterId(), level);
        }
Utility method that filters out hosts from set based on their maintenance
state status.
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java