log.debug("About to remove " + removeCount + " containers from " + phost);
// wipe out nodes if ramp down happened
Iterator<GridMember> iterator = getHostCountMembers(phost).iterator();
while (iterator.hasNext() && removeCount-- > 0) {
GridMember next = iterator.next();
log.debug("Adding " + next.getId() + " to remove list for " + phost);
remove.add(next);
}
}
// wipe out remaining node not tracked anymore
for (String rhost : hostCountHosts) {
Iterator<GridMember> iterator = getHostCountMembers(rhost).iterator();
while (iterator.hasNext()) {
GridMember next = iterator.next();
log.debug("Adding " + next.getId() + " to remove list for " + rhost);
remove.add(next);
}
}
}
data.setRemoveData(remove);