private void resetDatabase(TungstenProperties serviceProps,Map<String,String> progress) throws InterruptedException {
  DataSourceAdministrator admin=null;
  String serviceName=serviceProps.getString(ReplicatorConf.SERVICE_NAME);
  try {
    admin=new DataSourceAdministrator(serviceProps);
    admin.prepare();
    progress.put("clear data source catalogs",serviceName);
    boolean cleared=admin.resetAll();
    if (cleared) {
      logger.info("Data source catalog information cleared");
    }
 else {
      logger.info("Unable to clear data source information: service=" + serviceName);
    }
  }
 catch (  ReplicatorException e) {
    logger.error(String.format("Error while clearing data source information %s: %s",serviceName,e.getMessage()),e);
  }
 finally {
    if (admin != null) {
      admin.release();
    }
  }
}

private void resetDatabase ( TungstenProperties serviceProps , Map < String , String > progress ) throws InterruptedException { DataSourceAdministrator admin = null ; String serviceName = serviceProps . getString ( ReplicatorConf . SERVICE_NAME ) ; try { admin = new DataSourceAdministrator ( serviceProps ) ; admin . prepare ( ) ; progress . put ( "clear data source catalogs" , serviceName ) ; boolean cleared = admin . resetAll ( ) ; if ( cleared ) { logger . info ( "Data source catalog information cleared" ) ; } else { logger . info ( "Unable to clear data source information: service=" + serviceName ) ; } } catch ( ReplicatorException e ) { logger . error ( String . format ( "Error while clearing data source information %s: %s" , serviceName , e . getMessage ( ) ) , e ) ; } finally { if ( admin != null ) { admin . release ( ) ; } } }
resets all catalog data for data sources associated with current replicator .
