private void waitForAllNodesToBecome(String state,boolean isVersioned,String svcName){
  final String prefix="Waiting for all cluster nodes to become state: " + state;
  long start=System.currentTimeMillis();
  log.info(prefix);
  while (System.currentTimeMillis() - start < MAX_WAIT_TIME_IN_MIN * 60 * 1000) {
    try {
      if (isClusterStateDone(state,isVersioned,svcName)) {
        log.info("{} : Done",prefix);
        return;
      }
      Thread.sleep(WAIT_INTERVAL_IN_SEC * 1000);
    }
 catch (    InterruptedException ex) {
      log.warn("InterruptedException:{}",ex);
    }
catch (    FatalCoordinatorException ex) {
      log.error("fatal coodinator exception",ex);
      throw ex;
    }
catch (    Exception ex) {
      log.error("exception checking node status",ex);
    }
  }
  log.info("{} : Timed out",prefix);
  throw new IllegalStateException(String.format("%s : Timed out",prefix));
}

private void waitForAllNodesToBecome ( String state , boolean isVersioned , String svcName ) { final String prefix = "Waiting for all cluster nodes to become state: " + state ; long start = System . currentTimeMillis ( ) ; log . info ( prefix ) ; while ( System . currentTimeMillis ( ) - start < MAX_WAIT_TIME_IN_MIN * 60 * 1000 ) { try { if ( isClusterStateDone ( state , isVersioned , svcName ) ) { log . info ( "{} : Done" , prefix ) ; return ; } Thread . sleep ( WAIT_INTERVAL_IN_SEC * 1000 ) ; } catch ( InterruptedException ex ) { log . warn ( "InterruptedException:{}" , ex ) ; } catch ( FatalCoordinatorException ex ) { log . error ( "fatal coodinator exception" , ex ) ; throw ex ; } catch ( Exception ex ) { log . error ( "exception checking node status" , ex ) ; } } log . info ( "{} : Timed out" , prefix ) ; throw new IllegalStateException ( String . format ( "%s : Timed out" , prefix ) ) ; }
a private helper method to wait for all cluster nodes until they all become a certain state ( joined / migration_init / etc )
