" Falling back to a less optimal strategy that may result in worse performance. " +
" Try using an even number of sites per host.");
useFallbackStrategy = true;
}
JSONObject topo = null;
if (useFallbackStrategy) {
topo = fallbackPlacementStrategy(hostIds, hostCount, partitionCount, sitesPerHost);
} else {
try {
topo = newPlacementStrategy(hostIds, hostCount, partitionCount, sitesPerHost);
} catch (Exception e) {
hostLog.error("Unable to use optimal replica placement strategy. " +
"Falling back to a less optimal strategy that may result in worse performance");
topo = fallbackPlacementStrategy(hostIds, hostCount, partitionCount, sitesPerHost);
}
}
hostLog.debug("TOPO: " + topo.toString(2));
return topo;
}