{
if (failed) {
String msg = "node " + nodeId +
" reports failure in iteration " + iteration;
if (runException == null) {
runException = new AffinityGroupFinderFailedException(msg);
}
logger.log(Level.INFO, "node {0} reports failure", nodeId);
runFailed = true;
}
if (iteration != currentIteration) {
String msg = "node " + nodeId +
" reports unexpected iteration " + iteration;
if (runException == null) {
runException = new AffinityGroupFinderFailedException(msg);
}
logger.log(Level.INFO, "unexpected iteration: {0} on node {1}, " +
"expected {2}, marking run failed",
iteration, nodeId, currentIteration);
runFailed = true;