private boolean checkSufficientStores(final Set allStores,final boolean loggedInsufficentStores){
  if (!loggedInsufficentStores) {
    if (allStores.size() == 0) {
      insufficientStores(allStores,Collections.EMPTY_LIST,true);
      return true;
    }
  }
 else {
    if (allStores.size() > 0) {
      final StringId logStr=LocalizedStrings.PRHARRedundancyProvider_0_IN_THE_PARTITIONED_REGION_REGION_NAME_1;
      final Object[] logArgs=new Object[]{SUFFICIENT_STORES_MSG.toLocalizedString(),prRegion.getFullPath()};
      if (TEST_MODE) {
        logger.fatal(LocalizedMessage.create(logStr,logArgs));
      }
 else {
        logger.info(LocalizedMessage.create(logStr,logArgs));
      }
      return false;
    }
 else {
      insufficientStores(allStores,Collections.EMPTY_LIST,false);
    }
  }
  return loggedInsufficentStores;
}

private boolean checkSufficientStores ( final Set allStores , final boolean loggedInsufficentStores ) { if ( ! loggedInsufficentStores ) { if ( allStores . size ( ) == 0 ) { insufficientStores ( allStores , Collections . EMPTY_LIST , true ) ; return true ; } } else { if ( allStores . size ( ) > 0 ) { final StringId logStr = LocalizedStrings . PRHARRedundancyProvider_0_IN_THE_PARTITIONED_REGION_REGION_NAME_1 ; final Object [ ] logArgs = new Object [ ] { SUFFICIENT_STORES_MSG . toLocalizedString ( ) , prRegion . getFullPath ( ) } ; if ( TEST_MODE ) { logger . fatal ( LocalizedMessage . create ( logStr , logArgs ) ) ; } else { logger . info ( LocalizedMessage . create ( logStr , logArgs ) ) ; } return false ; } else { insufficientStores ( allStores , Collections . EMPTY_LIST , false ) ; } } return loggedInsufficentStores ; }
check to determine that there are enough datastore vms to start the bucket creation processes . log a warning or throw an exception indicating when there are not enough datastore vms .
