List<VoldemortServer> serverList = Lists.newArrayList(serverMap.get(3), serverMap.get(5),
serverMap.get(9), serverMap.get(11));
while(!rebalancingComplete.get()) {
Iterator<VoldemortServer> serverIterator = serverList.iterator();
while(serverIterator.hasNext()) {
VoldemortServer server = serverIterator.next();
if(ByteUtils.getString(server.getMetadataStore()
.get(MetadataStore.SERVER_STATE_KEY, null)
.get(0)
.getValue(),
"UTF-8")
.compareTo(VoldemortState.REBALANCING_MASTER_SERVER.toString()) == 0) {
logger.info("Server " + server.getIdentityNode().getId()
+ " transitioned into REBALANCING MODE");
serverIterator.remove();
}
}
if(serverList.size() == 0) {