private Configuration setupServer(Configuration config) throws Exception {
// The HBaseTestingUtility has some kind of memory leak in HBase 0.94.15+ on the Mac
// so the pom will use 0.94.14 until this gets fixed.
if(isDistributedCluster(config)){
IntegrationTestingUtility util = new IntegrationTestingUtility(config);
util.initializeCluster(this.NUM_SLAVES_BASE);
this.util = util;
// remove all hbase tables
HBaseAdmin admin = util.getHBaseAdmin();
HTableDescriptor[] tables = admin.listTables();
for(HTableDescriptor table : tables){
util.deleteTable(table.getName());
}
} else {
util = new HBaseTestingUtility(config);
util.startMiniCluster();
}
return util.getConfiguration();
}